The CURRENT_TIMESTAMP
function returns the current date and time as a datetime value. This value is derived from the operating system of the computer that the instance of SQL Server is running on.
This function is the ANSI SQL equivalent to the T-SQL GETDATE()
function, so you can use whichever one you prefer. Note that both functions have a lower date range and a lower default fractional precision than the T-SQL SYSDATETIME()
function (which returns a datetime2(7) value).
This article provides examples of the CURRENT_TIMESTAMP
function, including how you can use it with other functions to return the value you’re interested in.
Continue reading →