The T-SQL SysDateTime is an date function and returns a datetime2 value of the computer on which the instance of SQL Server is running.
SysDateTime Syntax:
SYSDATETIME()
SysDateTime Example:
SELECT CONVERT (date, SYSDATETIME()) as Date,
CONVERT (time, SYSDATETIME()) as Time,
SYSDATETIME() as SysDateTime;
Date | Time | SysDateTime |
---|---|---|
2014-03-01 | 16:18:57.3203477 | 2014-03-01 16:18:57.3203477 |