pulling a date out of a field containing both date and time

  • Thread starter Thread starter Paul
  • Start date Start date
P

Paul

I have a table with a field that contains both a Date and Time value,
obtained from the Now() function. I would like to create a query that
extracts only the date value, so I can group all values having the same
date, regardless of the time. Is there a function that will do this?

Thanks in advance,

Paul
 
Paul -

You can use the INT (integer) function. Dates are integers, while time is
stored as fractions. Removing the fraction pieces will result in just the
date. You can format the resulting integer to the date format of your
choice.
 
Ah, that's what I was looking for.

Thanks, Marsh.



Marshall Barton said:
Paul said:
I have a table with a field that contains both a Date and Time value,
obtained from the Now() function. I would like to create a query that
extracts only the date value, so I can group all values having the same
date, regardless of the time. Is there a function that will do this?


DateValue([date/time field])
 
Back
Top