Bill,

Queries covering date ranges are quite different.

If you have two columns, one for date and one for time, a date range query
is easy.

If you have two columns, a query for something that happened between 10 pm
on the 16th and 4 am on the 17th becomes a lot trickier. Try writing the
where clause in your head.

If you have one column for datetime, a date range query becomes tricker,
because "equal" will be looking for equality to the smallest detail.
So you'll have to fiddle with some variables after you collect user input,
and do some >= and < combinations. To find things that happened on the 16th
or 17th:

  WHERE datetimecol >= '10/16/2012' AND datetimecol < '10/18/2012'

Datetime will be more familiar to new talent that is coming from SQL
Server, where that's the only kind of date or time data type.

If you export to Excel, or your users do from Browser, datetime conversions
and the ability to sort in Excel will be handled differently between the
two design methods. Test with your versions of Excel.

Bill




On Wed, Oct 17, 2012 at 2:08 PM, William Stacy <[email protected]>wrote:

> Are there any advantages to using one DateTime column over  2 separate
> columns of Date and Time?
>
> Also, I'm wondering if DateTime or Date+Time stamps could be used instead
> of autonumbering with it's rules etc.?  It seems to me that it would be
> rare to have any duplications of DateTime or of Date+Time if time is stored
> to milliseconds, unless rows are being added programmatically as opposed to
> by key data entry.
>
> --
> William Stacy, O.D.
>
> Please visit my website by clicking on :
>
> www.FolsomEye.com
>
>
>
>

Reply via email to