Curriculum
Course: SQL
Login

Curriculum

SQL

SQL References

0/80

MySQL Functions

0/139

SQL Server Functions

0/84

SQL Quick Ref

0/1
Text lesson

CURRENT_TIMESTAMP

Example

Retrieve and return the current date and time.

SELECT CURRENT_TIMESTAMP;

Definition and Usage

CURRENT_TIMESTAMP function provides the current date and time in the format ‘YYYY-MM-DD hh:mm.mmm’.

Tip: Consider using the GETDATE() function for similar functionality.

Syntax

CURRENT_TIMESTAMP

Technical Details

Works in:

SQL Server (beginning from 2008), Azure SQL Database, Azure SQL Data Warehouse, and Parallel Data Warehouse