Date Timestamp

  • Thread starter Thread starter Matt
  • Start date Start date
M

Matt

I'm having problems trying to pull a set of data based off the date. This
date field has a date and timestamp. (Example: 5/18/2009 6:03:49 PM)

What i'm trying to do is pull all records <=#5/18/2009#. Since it has a
timestamp, I don't get all the records with 5/18/2009 in the date field.

Is there a way I can convert the dates to not include the timestamp and
still pull everything that is <=#5/18/2009#?

I'm hoping to do this without bringing the data into a local table and
changing the field format to short date. Reason being that the table I'm
pulling from is quite large.

Thanks in advance for your help.
 
I'm having problems trying to pull a set of data based off the date. This
date field has a date and timestamp. (Example: 5/18/2009 6:03:49 PM)

What i'm trying to do is pull all records <=#5/18/2009#. Since it has a
timestamp, I don't get all the records with 5/18/2009 in the date field.

Is there a way I can convert the dates to not include the timestamp and
still pull everything that is <=#5/18/2009#?

I'm hoping to do this without bringing the data into a local table and
changing the field format to short date. Reason being that the table I'm
pulling from is quite large.

Thanks in advance for your help.

Try a parameter query and include the entire day in the parameter:

< DateAdd("d", 1, [Enter date:])

If you enter 5/18 at the prompt, this expression will find all records before
midnight 5/19 - i.e. up through 11:59:59.99999999999 on the 18th.
 
Back
Top