When using SQL Server & ASP.NET, is there a performance / storage consideration when using Date vs DateTime?
Even if I don’t need it, I’ve been using DateTime for most things
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
DateTime takes 8 bytes per value
Date is 3 bytes.
I can’t speak for low level performance; however in general we’ve found it a mistake to store values as DateTime by default. Sooner or later you run into the UTC issue and have to start working out offsets for dates that have 00:00:00.000 in the time portion!
If you’re just storing dates I’d stick to the Date datatype; you’ll fit more rows per page and save yourself a lot of hassle