Good point Dan, but computed values apply here to, don't they?

Couldn't you do:

 where date(datetime) between '02-01-2002'  and '02-05-2002'

instead of:
 where datetime between '02-01-2002 00:00'  and '02-05-2002 23:59'

Terry

On Thu, 28 Feb 2002 [EMAIL PROTECTED] wrote:

> We have a database that stores date and time as separate values in
> different
> fields. I am wondering when it could be useful? I used to store datetime in
> one field as a result of 'now()' function.
>
> ***********************************
>
> In addition to the group by date thing that was already mentioned, consider
> the following,
>
> where date = '20020228'
> is a lot more user freindly than
> where datetime between '02-28-2002 00:00'  and '02-28-2002 23:59'
> or
> where date(datetime) =  '20020228'
>
> where date between '20020201' and '20020205'
> is a lot more user freindly than
> where datetime between '02-01-2002 00:00'  and '02-05-2002 23:59'
>
> etc.
>
> Also, depending on what data you are collecting, it may be possible that
> you know the date but not the time.  With separate fields, you can leave
> one as null.
>
> -
> You are subscribed to the CFUGToronto CFTALK ListSRV.
> This message has been posted by: [EMAIL PROTECTED]
> To Unsubscribe, Please Visit and Login to http://www.CFUGToronto.org/
> Manager: Kevin Towes ([EMAIL PROTECTED]) http://www.CFUGToronto.org/
> This System has been donated by Infopreneur, Inc.
> (http://www.infopreneur.net)
>

-- 
Terry Fielder
Network Engineer
Great Gulf Homes / Ashton Woods Homes

-
You are subscribed to the CFUGToronto CFTALK ListSRV.
This message has been posted by: [EMAIL PROTECTED]
To Unsubscribe, Please Visit and Login to http://www.CFUGToronto.org/
Manager: Kevin Towes ([EMAIL PROTECTED]) http://www.CFUGToronto.org/
This System has been donated by Infopreneur, Inc.
(http://www.infopreneur.net)

Reply via email to