SQL Server日期和时间函数
1.当前时间 SELECT GETDATE() 2.日期格式,使用CONVERT转换SELECT CONVERT(VARCHAR,GETDATE(),25) 2012-08-15 11:33:35.780 SELECT CONVERT(VARCHAR,GETDATE(),121) 2012-08-15 11:33:35.780 SELECT CONVERT(VARCHAR,GETDATE(),24) 11:32:55 SELECT CONVERT(VARCHAR,GETDATE(),108) 11:32:55 SELECT CONVERT(VARCHAR,GETDATE(),23) 2012-08-15 SELECT CONVERT(VARCHAR,GETDATE(),23) 2012-08-15 11:34:49 SELECT CONVERT(VARCHAR,GETDATE(),120) 2012-08-15 11:34:49 SELECT CONVERT(VARCHAR,GETDATE(),114) 11:39:06:840 SELECT CONVERT(VARCHAR,GETDATE(),113) 15 08 2012 11:38:35:750 SELECT CONVERT(VARCHAR,GETDATE(),112) 20120815 SELECT CONVERT