CURRENT_TIMESTAMP (TSQL Function)

Returns the local current datetime. It is the ANSI SQL equivalent to GETDATE.

Syntax

CURRENT_TIMESTAMP

Arguments

This function is called without parenthese and takes no argument.

Return Types

Returns datetime.

Remarks

With RSQL, GETDATE and CURRENT_TIMESTAMP return exactly the same result as SYSDATETIME.

However, with MS SQL Server, GETDATE and CURRENT_TIMESTAMP have lower subsecond precision than SYSDATETIME.

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
RSQL, a simple alternative to Microsoft SQL Server