how to get data that crosses two dates

TNtangler

New member
Local time
Today, 05:38
Joined
Nov 18, 2008
Messages
2
I have a table that has multiple dates in one field and time in another field. What I'm trying to do is only extract data between 2 dates example today and tomorrow that has a start time say at 9pm to 6am the next day. I'm not sure if I'm asking this right. Any help would be greatly appreciated.....
 
How about:

Select * FROM MyTable WHERE (MyDate BETWEEN [Date1] AND [Date2]) AND (MyTime BETWEEN [Time1] AND [Time2]);

The names within the brackets refer to controls (textboxes, comboboxes, etc.) on the form where u would enter these parameters and display the filtered data.

HTH
 
Well, I think you might want to separate your dates into their own fields, or create a new linked table that stores the data for each date of each record.
If I understand correctly you might have a text string like "Date1 YadaYada Date2 BlahBlah etc" all in the same field
Is that right?
 

Users who are viewing this thread

Back
Top Bottom