Getutcdate() is an date function and returns the current database system timestamp as a datetime value. This value represents the current UTC time: Coordinated Universal Time.
GETUTCDATE() Syntax:
GETUTCDATE()
GETUTCDATE() Example:
select getutcdate() as System_date;
System_date |
---|
2014-03-01 06:26:25.617 |
SELECT CONVERT (date, GETUTCDATE()) as Utc_date,
CONVERT (time, GETUTCDATE()) as Utc_time,
CONVERT (datetime, GETUTCDATE()) as Utc_datetime,
CONVERT (datetime2, GETUTCDATE()) as Utc_datetime2;
Utc_date | Utc_time | Utc_datetime | Utc_datetime2 |
---|---|---|---|
2014-03-01 | 06:28:30.1930000 | 2014-03-01 06:28:30.193 | 2014-03-01 06:28:30.1930000 |