SYSDATETIME (TSQL Function)
Returns the local current datetime.
Syntax
SYSDATETIME ( )
Return Types
Returns datetime
.
Remarks
With RSQL, GETDATE
and CURRENT_TIMESTAMP
return exactly the same result as SYSDATETIME
.
However, with MS SQL Server,
GETDATE
andCURRENT_TIMESTAMP
have lower subsecond precision thanSYSDATETIME
.
Examples
PRINT SYSDATETIME();
PRINT GETDATE();
PRINT CURRENT_TIMESTAMP;
The result is:
2016-03-04 22:01:01.494846812
2016-03-04 22:01:01.494846812
2016-03-04 22:01:01.494846812