In this comprehensive article, I’ll explain the various approaches to getting today’s date in SQL Server and help you choose the correct function for your specific requirements.
SQL Server Get Today’s Date
Before diving into the specifics, it’s essential to understand that SQL Server provides multiple built-in functions for retrieving the current date and time.
Approach-1: Using GETDATE()
The most commonly used function to retrieve the current date and time in SQL Server is GETDATE(). This function returns the current database system date and time in the ‘YYYY-MM-DD hh:mm.mmm’ format.
SELECT GETDATE() AS CurrentDateTimeAfter executing the above query, I got today’s date with time as expected, as shown in the screenshot below.

If you only need the date part without the time component, you can use the query below with the CAST function.
SELECT CAST(GETDATE() AS DATE) AS CurrentDateAfter executing the above query, I got the output as expected as per the below screenshot.

Note that GETDATE() is available in all versions of SQL Server.
Approach-2 : Using SYSDATETIME()
If you need higher-precision timestamps, SYSDATETIME() is the preferred choice. This function returns the date and time with fractional-second precision up to 7 digits (100 nanoseconds).
SELECT SYSDATETIME() AS CurrentDateTimeAfter executing the above query, I got the expected output as shown in the screenshot below.

To extract just the date, we can execute the following query.
SELECT CAST(SYSDATETIME() AS DATE) AS CurrentDateAfter the above query execution, I got the output as expected, as per the below screenshot.

Approach-3 : Using GETUTCDATE()
SQL Server provides UTC-specific date functions that return the current date and time in Coordinated Universal Time (UTC).
We can also use the GETUTCDATE() with the following query.
Select GETUTCDATE() as currentdatetimeI got the expected output after executing the above query. Check out the screenshot below.

If you wish to get only the date part, then we can use the following query.
SELECT CAST(GETUTCDATE() AS DATE) AS CurrentDateI got the expected output as shown in the screenshot below.

Approach-4: Using SYSUTCDATETIME()
We can use the SYSUTCDATETIME() UTC-specific date functions for this purpose. Let’s execute the query below to get today’s date and time.
Select SYSUTCDATETIME() as Todaydatetime;After executing the above query, I got the successful output as shown in the screenshot below.

If you wish to retrieve only the date part, you can use the following query.
SELECT CAST(SYSUTCDATETIME() AS DATE) AS TodayDateI got the expected output as per the screenshot below.

Comparison of Date Functions in SQL Server
Here’s a comparison of the most commonly used date functions:
| Function | Return Type | Precision | Time Zone Awareness | SQL Standard |
|---|---|---|---|---|
| GETDATE() | datetime | 3 milliseconds | No | No |
| CURRENT_DATE | date | Day | No | Yes |
| SYSDATETIME() | datetime2 | 100 nanoseconds | No | No |
| GETUTCDATE() | datetime | 3 milliseconds | Yes (UTC) | No |
| SYSUTCDATETIME() | datetime2 | 100 nanoseconds | Yes (UTC) | No |
Practical Usage for Today’s Date inside SQL Server table
Filtering Records for Today
Here’s how to get all the records from today’s sales table.
SELECT * FROM sales
WHERE CAST(sale_Date AS DATE) = CAST(GETDATE() AS DATE)After executing the above query, I got the expected output as shown in the screenshot below.

Similarly, you can execute the query below to get the date ranges.
SELECT * FROM sales
WHERE sale_Date BETWEEN DATEADD(DAY, -30, CAST(GETDATE() AS DATE)) AND CAST(GETDATE() AS DATE)After executing the above query, I got the expected output as shown in the screenshot below.

Creating Default Values
Today’s date is often used as the default value for date columns. Let’s create a table using the query below.
CREATE TABLE DefaultEmployees (
EmployeeID INT PRIMARY KEY,
Name NVARCHAR(100),
Hire_Date DATE DEFAULT CAST(GETDATE() AS DATE)
)After executing the above query, the table was created successfully with the default column value, as per the screenshot below.

Video Tutorial
Conclusion
Getting today’s date in SQL Server may seem straightforward, but as this article explains, there are multiple approaches with different advantages depending on your specific needs.
For most scenarios, GETDATE() combined with CAST is sufficient. If you require high precision or time zone information, consider SYSDATETIME() or the UTC variants.
You may also like the following articles.
- SQL Server Date In Where Clause
- SQL Server Get Month From Date
- SQL Server Extract Year From Date
- SQL Server Filter By Date
- How To Get Previous Month Data From Current Date In SQL Server
After working for more than 15 years in the Software field, especially in Microsoft technologies, I have decided to share my expert knowledge of SQL Server. Check out all the SQL Server and related database tutorials I have shared here. Most of the readers are from countries like the United States of America, the United Kingdom, New Zealand, Australia, Canada, etc. I am also a Microsoft MVP. Check out more here.