Jen

T-SQL Function DATEPART

範例:

 SELECT DATEPART(hour,getdate()) as 'h',DATEPART(minute,getdate()) as 'm'
參考網站:http://msdn.microsoft.com/en-us/library/ms174420.aspx

0 意見: