Why does DATEDIFF say 1 minute between two times only 3 seconds apart? It is not a bug. Here is how DATEDIFF counts datepart boundaries.
SQL SERVER 2012 – DateTime Functions – DATEFROMPARTS() – DATETIMEFROMPARTS() – DATETIME2FROMPARTS()
SQL Server 2012 adds seven new datetime functions, such as DATEFROMPARTS, DATETIMEFROMPARTS and EOMONTH. A quick look at building dates from their parts.
GETUTCDATE and SYSUTCDATETIME: Which Current Time Function Returns What
GETUTCDATE and SYSUTCDATETIME return the current time in UTC, while GETDATE and SYSDATETIME return the local time of the server. This post runs all four side by side and shows their data types and precision. It also shows why GETDATE values always end in 0, 3 or 7, and why a time stamp column should store UTC.
CONVERT Date Styles: Use Explicit Numeric Formats
CONVERT date styles make date displays explicit. Keep the typed value for date logic and agree the output format with the receiving interface.
Fiscal Years That Do Not Start in January
Compute fiscal years and quarters from an April start, build indexed date boundaries, and store a fiscal calendar for repeatable reports.
SQL SERVER – Information Related to DATETIME and DATETIME2
A reader comment explains the precision issue between DATETIME and DATETIME2: values lose precision when converted between types. Here is the workaround.
CURRENT_DATE, || and Other Small T-SQL Changes in SQL Server 2025
Use CURRENT_DATE, string concatenation, optional SUBSTRING length and bigint DATEADD in SQL Server 2025 with clear examples and checks.






