eliminate time in DateTime column

S

smk23

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]
 
Top