Why Am I Always Late? Or Is It Early? Why Are Dates So Hard?
Regular 50 minute session for SQLBits 2026TL; DR
Dates are hard, and date logic even more so! Let's dive into common problems with dates in transactional systems and how to solve them!
Session Details
Among the challenges developers face are naming things, cache invalidation, and off-by-one errors. But the one we never talk about is date logic! Date logic is full of fallacies and challenges that we as developers often hand-wave away, only to be bitten later!
In this talk, we will explore and explain some of the more common fallacies and challenges, such as daylight savings, non-standard timezones, and the ever present challenge of presenting back to the user. Along the way, we will discuss how to properly store dates and times in SQL Server, how to leverage the newer types in .NET, and what to do with browser display. Lastly, we will talk through what to do with systems that already exist and are suffering date and time-related issues.
In this talk, we will explore and explain some of the more common fallacies and challenges, such as daylight savings, non-standard timezones, and the ever present challenge of presenting back to the user. Along the way, we will discuss how to properly store dates and times in SQL Server, how to leverage the newer types in .NET, and what to do with browser display. Lastly, we will talk through what to do with systems that already exist and are suffering date and time-related issues.
3 things you'll get out of this session
Understand common fallacies with dates and times
Learn best practices for storing dates and times
Learn how the application tier should handle dates and times
Learn best practices for storing dates and times
Learn how the application tier should handle dates and times
Speakers
Dan Mallott's other proposed sessions for 2026
ORMs and the DBA: How to Make Both Happy - 2026
Testing! We're Talking About (Unit) Testing...Your Database! - 2026
The Field Guide For the Accidental Manager - 2026
Zero to Hero: Surviving the Transaction Process Like a Pro - 2026
Dan Mallott's previous sessions
Testing! We're Talking About (Unit) Testing!
Is the business logic in your database tested? It should be, and in this talk, we'll talk about how.
Secure SQL Server Database Design: Tactics and Technology
When you design and build an application, do you think about security first or is it an afterthought? In this talk, you will learn strategies for designing and securing your data layer.