bugl
bugl
HomeLearnPatternsSearch
HomeLearnPatternsSearch

Loading lesson path

Learn/SQL/SQL References
SQL•SQL References

SQL Server GETDATE() Function

Concept visual

SQL Server GETDATE() Function

Pointer walk
two pointers
leftright102132436485116
left=0
right=6
1
3

Start at both ends

Example

Return the current database system date and time:

Select

GETDATE();

Definition and Usage

The GETDATE() function returns the current database system date and time, in a

Formula

'YYYY - MM - DD hh:mm:ss.mmm' format.

Tip:

Also look at the

CURRENT_TIMESTAMP function.

Syntax

Getdate()

Technical Details

Return type:

datetime

Works in:

SQL Server (starting with 2008), Azure SQL Database, Azure SQL Data Warehouse, Parallel Data Warehouse

Previous

❮ SQL Server Functions

Next

Previous

SQL Server DAY() Function

Next

SQL Server GETUTCDATE() Function