How to Get Current Date & Time in T-SQL (No Time Zone) Database: MS SQL Server Operators: GETDATE() CURRENT_TIMESTAMP SYSDATETIME() Table of Contents Problem Solution Discussion Problem You’d like to get the current date and time in T-SQL, but you don’t want the time zone offset. Solution We’ll use GETDATE(), CURRENT_TIMESTAMP, and SYSDATETIME() to get the current date and time without the time zone offset. The first two functions allow us to get the current time with a lower precision. (GETDATE() is a T-SQL function, while CURRENT_TIMESTAMP is a SQL standard function; both functions return the same data type). The third function, SYSDATETIME(), is a SQL Server function that returns a higher-precision time. SELECT CURRENT_TIMESTAMP; Here’s the result of the query: 2019-08-14 10:01:06.983 Discussion In a SQL Server database, the CURRENT_TIMESTAMP function returns the current date and time (i.e. the time on the machine where that SQL Server instance runs) as a datetime datatype. Datetime is a lower-precision time that has a maximum of three fractional seconds. (In our example, this is 983.) GETDATE() is similar to the CURRENT_TIMESTAMP and returns the same result. The difference is that CURRENT_TIMESTAMP is SQL standard, while GETDATE() is specific to SQL Server. SELECT GETDATE(); Of course, if you want to get a higher-precision current date and time without a time zone offset, you can use the SYSDATETIME() function. This function returns a datetime2 data type with seven fractional seconds. Look at the example below: SELECT SYSDATETIME(); Here’s the result: 2019-08-14 10:01:06.9754163 Recommended courses: SQL Basics in SQL Server Common Functions in SQL Server Recommended articles: SQL Server Cheat Sheet Top 29 SQL Server Interview Questions How to Learn T-SQL Querying 5 SQL Functions for Manipulating Strings 18 Useful Important SQL Functions to Learn ASAP Performing Calculations on Date- and Time-Related Values See also: How to Get the Year from a Date in T-SQL How to Get the Month from a Date in T-SQL How to Get the Day from a Date in T-SQL How to Get the Current Date (Without Time) in T-SQL Subscribe to our newsletter Join our monthly newsletter to be notified about the latest posts. Email address How Do You Write a SELECT Statement in SQL? What Is a Foreign Key in SQL? Enumerate and Explain All the Basic Elements of an SQL Query