eliminate time in DateTime column

G

Guest

How do I get just the Date in a datetime column? i.e. 2007-08-06 15:30:00
value where I want just the date part: 2007-08-06

I am filtering by date and unless the time value is 00:00:00 it won't pull
records on the specified date.

Thanks
 
K

Ken Snell \(MVP\)

Use DateValue function in the query:

JustTheDate: DateValue([FieldName])
 
J

John W. Vinson

How do I get just the Date in a datetime column? i.e. 2007-08-06 15:30:00
value where I want just the date part: 2007-08-06

I am filtering by date and unless the time value is 00:00:00 it won't pull
records on the specified date.

Thanks

If you want to permanently and irrevokably discard the time portion of your
data (which I would recommend that you do *NOT* do!!) you can run an Update
query updating the field to

DateValue([fieldname])

As a search criterion to find all of the data between midnight and
11:59:59.999999 pm, you can use a criterion
= [Enter date:] AND < DateAdd("d", 1, [Enter date:])


John W. Vinson [MVP]
 

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

Top