The final word on storage for DATETIME2
Two years ago I wrote a post that got a lot of traction in the comments at the time. Last month there was renewed interest… Read More »The final word on storage for DATETIME2
Two years ago I wrote a post that got a lot of traction in the comments at the time. Last month there was renewed interest… Read More »The final word on storage for DATETIME2
This post dives into how SQL Server stores date and time data types in memory and on disk. But first, a note about endianness: CPUs… Read More »How SQL Server stores data types: dates and times
We are now in the home stretch of the long-running series about dates and times in SQL Server and Azure SQL Database. This week we… Read More »Dates and Times in SQL Server: DATEADD()
Continuing the series on dates and times in SQL Server and Azure SQL Database, this week we look at the hint AT TIME ZONE. In… Read More »Dates and Times in SQL Server: AT TIME ZONE
Last time we looked at DATEPART(). This post is all about the DATENAME() function. So many similarities There are many similarities between DATEPART and DATENAME.… Read More »Dates and Times in SQL Server: DATENAME()
In my previous posts in this series we’ve seen reference to Transact-SQL (T-SQL) functions that are used to get the specific part of a date… Read More »Dates and Times in SQL Server: DATEPART()
Previously we looked at four built-in functions to get the current date and time in SQL Server and Azure SQL Database using Transact-SQL (T-SQL). We… Read More »Dates and Times in SQL Server: more functions you should never use
This post continues our look at date and time data types in SQL Server. SQL Server 2008 introduced new data types to handle dates and… Read More »Dates and Times in SQL Server: DATETIMEOFFSET
This post continues our look at date and time data types in SQL Server. SQL Server 2008 introduced new data types to handle dates and… Read More »Dates and Times in SQL Server: DATETIME2
In the #sqlhelp Slack channel on the SQL Server Community Slack workspace last month, Jemma Hooper asked: When trying to CAST or CONVERT a datetime2… Read More »Why is a value in DATETIME2 8 bytes, but in BINARY it is 9 bytes?
Today’s public service announcement is a reminder to be wary of date formatting in SQL Server. On a recent mailing list discussion, one person demonstrated… Read More »Be Wary of Date Formatting in T-SQL
This is the first in a short series of posts about how I assign efficient data types when designing a new table or database. Use… Read More »Data Efficiency in SQL Server: DATETIME