Collections:
Get System Date and Time in SQL Server Transact-SQL
How to get system date and time in SQL Server Transact-SQL? I want a list of functions for getting current system date and time.
✍: FYIcenter.com
Here is a comparison of all functions that you can use
to get the current date and time from the data base server system:
Function Return type Precision ------------------- ----------------- ----------- SYSDATETIME() DATETIME2(7) 0.0000001 s SYSDATETIMEOFFSET() DATETIMEOFFSET(7) 0.0000001 s SYSUTCDATETIME() DATETIME2(7) 0.0000001 s CURRENT_TIMESTAMP DATETIME 0.00333 s GETDATE() DATETIME 0.00333 s GETUTCDATE() DATETIME 0.00333 s
Things to remember with selecting the get system date and time functions:
⇒ Verify Time Precision in SQL Server Transact-SQL
⇐ Date/Time Data Type Comparison in SQL Server Transact-SQL
⇑ Date/Time Operations and Functions in SQL Server Transact-SQL
2017-02-25, 4071🔥, 0💬
Popular Posts:
How to download Microsoft SQL Server 2005 Express Edition in SQL Server? Microsoft SQL Server 2005 E...
What Happens to Your Transactions When ERROR 1213 Occurred in MySQL? If your transaction receives th...
What Are Out-of-Range Errors with DATETIME values in SQL Server Transact-SQL? When you enter DATETIM...
How to check if two JSON values have overlaps using the JSON_OVERLAPS() function? JSON_OVERLAPS(json...
How to set the current database in SQL Server? Once you are connected to the SQL Server, you should ...