How to Get the Current Date and Time in SQL Server
Last updated July 25, 2026 · By the SaturnSQL team
GETDATE() returns the current local datetime, SYSDATETIME() the same at datetime2 precision, and GETUTCDATE()/SYSUTCDATETIME() the UTC equivalents. CAST to date when you only want the day.
GETDATE() returns datetime, accurate to roughly 3 milliseconds. SYSDATETIME() returns datetime2 at far higher precision and is the better default on modern versions. The two UTC variants return the same instants in UTC, which is what anything compared across regions should use. SYSDATETIMEOFFSET() adds the offset itself.
SELECT GETDATE(), SYSDATETIME(), GETUTCDATE(), SYSUTCDATETIME();Today's date without the time
Casting to date is the correct way to strip the time; the old CONVERT(varchar, GETDATE(), 112) trick produces a string that sorts as one. When filtering, avoid CAST(created_at AS date) = @today, since wrapping the column makes the predicate non-sargable and blocks the index. Use created_at >= @today AND created_at < DATEADD(day, 1, @today) instead.
SELECT CAST(GETDATE() AS date) AS today;Run this in SaturnSQL
SaturnSQL is a browser-based SQL editor for teams: shared query library, schema-aware autocomplete, and scheduled exports to Google Sheets and Slack.
Try it free