When to use separate date and time instead of a single datetime

datetime, sql, sql-server

Solution

In SQL Server 2008 you have date and time data types so this becomes a non issue.

If it is good choice it really depends by your business and how you will query you data.

If for example you want to know all the orders places between 1 and 2 PM for any day using a separated `Date` and `Time` column will make it quicker

Problem

If I want to store date and time, is it better to store them in a separate date and time or use a single datetime? When should we use date and time instead of a single datetime? I want to filter my queries either using date or time.

Original source