Find Records Between Date/Time

S

SLA

I need help. I have 2 fields one is startdatetime and the
other, enddatetime (I cannot change the design of the
table - these fields are DATE/TIME data types). I need to
find the records whose startdatetime and enddatetime falls
on the current datetime. For example, today is Monday, 7
July 2004, 12am. Show me all the records whose
startdatetime and enddatetime is between today's date
12:01:00 am and today's date 11:59:59pm.
 
R

Rick B

I think you would just build your query and indicate that you want to see
any records where the STARTINGDATETIME *or* ENDINGDATETIME is equal tot he
current date.

something like


STARTDATE: format([STARTINGDATETIME], "SHORT DATE")

for the field and then the criteria...

= Date()


then in another row...

ENDDATE: format([ENDDATETIME], "SHORT DATE")

and the criteria...

= Date()


Rick B

And by the way, you could easily change the structure of your database. You
could create queries to update fields similar to what we just did above.




I need help. I have 2 fields one is startdatetime and the
other, enddatetime (I cannot change the design of the
table - these fields are DATE/TIME data types). I need to
find the records whose startdatetime and enddatetime falls
on the current datetime. For example, today is Monday, 7
July 2004, 12am. Show me all the records whose
startdatetime and enddatetime is between today's date
12:01:00 am and today's date 11:59:59pm.
 
R

Rick B

I should have said in an other COLUMN, not ROW.


I think you would just build your query and indicate that you want to see
any records where the STARTINGDATETIME *or* ENDINGDATETIME is equal tot he
current date.

something like


STARTDATE: format([STARTINGDATETIME], "SHORT DATE")

for the field and then the criteria...

= Date()


then in another row... <------------------------- "column"

ENDDATE: format([ENDDATETIME], "SHORT DATE")

and the criteria...

= Date()


Rick B

And by the way, you could easily change the structure of your database. You
could create queries to update fields similar to what we just did above.




I need help. I have 2 fields one is startdatetime and the
other, enddatetime (I cannot change the design of the
table - these fields are DATE/TIME data types). I need to
find the records whose startdatetime and enddatetime falls
on the current datetime. For example, today is Monday, 7
July 2004, 12am. Show me all the records whose
startdatetime and enddatetime is between today's date
12:01:00 am and today's date 11:59:59pm.
 

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