Board index » delphi » Problem with Date/Time fields in Querys

Problem with Date/Time fields in Querys

I am Creating a query to grab information on data entered into a tracking
system. The problem is that the SQL statment to pull the data is giving me
trouble.
What I am trying to do is to get a group of date for a particular date in in
time, but the field that I am getting the date from is a date time field in
an access database (I am using ADO query to get the data) and I can not get
the query to work for me.

Sample Data

open_date                    callid
01/07/2001 13:45:00    30001
02/07/2001 12:50:00    30002
03/07/2001 10:40:00    30003

Thanks for you help.

 

Re:Problem with Date/Time fields in Querys


Quote
>I am Creating a query to grab information on data entered into a tracking
>system. The problem is that the SQL statment to pull the data is giving me
>trouble.
>What I am trying to do is to get a group of date for a particular date in in
>time, but the field that I am getting the date from is a date time field in
>an access database (I am using ADO query to get the data) and I can not get
>the query to work for me.

>Sample Data

>open_date                    callid
>01/07/2001 13:45:00    30001
>02/07/2001 12:50:00    30002
>03/07/2001 10:40:00    30003

You want records for one Day in time?

Select * from yourTbl where
Open_Date >= #02/07/2001# and Open_date < #02/08/2001#
--
Brian Bushay (TeamB)
Bbus...@NMPLS.com

Other Threads