Editorial Rss

Date and Time Options

Old habits die hard; at least for me that is true. I find that I am still using the old DateTime data type, even though other options were introduced in SQL Server 2008 resulting in equivalent, more, or less precision while using less memory in some cases.

Susan Ibach did a nice blog a few years ago breaking out some of the benefits of using the newer date data types that is worth your time if you are not up on the latest ones available in 2008. In her blog she demonstrates some of the disk and memory savings characteristics and much more. She also expands on the new precisions available.
Dot Net does not have equivalent data types for all the SQL Server date types. The DateTime data type has a precision of ticks, which is 1 ten-millionth of a second, which should accommodate the most precise date data type.  But what do you use of the simply SQL Server time data type. In that case you will find yourself using a TimeSpan Dot Net data type. Not all relational databases support a Time only data type.
Is it time to move away from old habits? Should we separate time and date in our schema? Should we use more precise versions of storing the combined Date and Time? Should the DateTime data type simply be deprecated? Share your thoughts on the topic.