1SELECT SYSDATETIME()
2 ,SYSDATETIMEOFFSET()
3 ,SYSUTCDATETIME()
4 ,CURRENT_TIMESTAMP
5 ,GETDATE()
6 ,GETUTCDATE();
7/* Returned:
8SYSDATETIME() 2007-04-30 13:10:02.0474381
9SYSDATETIMEOFFSET()2007-04-30 13:10:02.0474381 -07:00
10SYSUTCDATETIME() 2007-04-30 20:10:02.0474381
11CURRENT_TIMESTAMP 2007-04-30 13:10:02.047
12GETDATE() 2007-04-30 13:10:02.047
13GETUTCDATE() 2007-04-30 20:10:02.047
14*/
15
1SELECT CONVERT (DATE, SYSDATETIME())
2 ,CONVERT (DATE, SYSDATETIMEOFFSET())
3 ,CONVERT (DATE, SYSUTCDATETIME())
4 ,CONVERT (DATE, CURRENT_TIMESTAMP)
5 ,CONVERT (DATE, GETDATE())
6 ,CONVERT (DATE, GETUTCDATE());
7
8/* Returned
9SYSDATETIME() 2007-05-03
10SYSDATETIMEOFFSET()2007-05-03
11SYSUTCDATETIME() 2007-05-04
12CURRENT_TIMESTAMP 2007-05-03
13GETDATE() 2007-05-03
14GETUTCDATE() 2007-05-04
15*/
16