SQL Server: GETUTCDATE function

GETUTCDATE function

This SQL Server tutorial explains how to use the GETUTCDATE function in SQL Server (Transact-SQL) with syntax and examples.

Description

In SQL Server (Transact-SQL), the GETUTCDATE function returns the current UTC date and time.

Syntax

The syntax for the GETUTCDATE function in SQL Server (Transact-SQL) is:

GETUTCDATE ( )

Parameters or Arguments

There are no parameters or arguments for the GETUTCDATE functions.

Note

  • The GETUTCDATE functions returns the UTC date and time in the format ‘yyyy-mm-dd hh:mi:ss.mmm‘.
  • The UTC date and time is determined by the operating system settings.

Applies To

The GETUTCDATE functions can be used in the following versions of SQL Server (Transact-SQL):

  • SQL Server 2017, SQL Server 2016, SQL Server 2014, SQL Server 2012, SQL Server 2008 R2, SQL Server 2008, SQL Server 2005

Example

Let’s look at some SQL Server GETUTCDATE functions examples and explore how to use the GETUTCDATE functions in SQL Server (Transact-SQL).

For example:

SELECT GETUTCDATE();
Result: '2014-04-29 00:27:58.657'

Leave a Reply