Query using date and time in seperate fields

K

Kieran

I am having problems generating a query to find records between a start date
and time and a finish date and time. As the table I am querying stores the
two valuse in seperate fields, using BETWEEN is not working.
The table I am querying, called imt_log, stores the date and time in
seperate fields.
The fields are called imt_log.date and imt_log.time

Example:
Find records from 7-Jan-2008 08:00:00 to 14-Jan-2008 07:59:59

Do I need to create some Vb code or is it possible to do it with a nested
query.

Thanks in advance.
 
K

KARL DEWEY

If your fields are datetime datatype then use a calculated field like this ---
My_Date_Time: [imt_log].[date] + [imt_log].[time]
Then use BETWEEN as criteria.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top