Myself Ashutosh Kumar Verma from Varanasi. I am a Software Developer in MindStick Software pvt. ltd. Prayagraj. I have completed my MCA from VBSP. University, Jaunpur in 2021.
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy.
There are two functions that you can use to find the current database UTC date and time in SQL Server:
The GETUTCDATE() function returns the current database system UTC date and time, in a 'YYYY-MM-DD hh:mm:ss. mmm' format.
The SYSUTCDATE() function also returns the current database system UTC date and time, but it has more fractional seconds precision.
For example, the following query will return the current database UTC date and time:
SQL
This query will return a value in the format 'YYYY-MM-DD hh:mm:ss. mmm'.
Here is the syntax for the GETUTCDATE() function:
SQL
Here is the syntax for the SYSUTCDATE() function:
SQL
Both of these functions are very efficient, and they will not block other queries from running.
GETUTCDATE():
SQL GETUTCDATE() function is returns the current Database UTC (Coordinated Universal Time) date and time SQL Server.
Example: