Extracting Date from Date/Time Field

G

Guest

I need to extract just the date portion of a date/time field in order to
compare with another date field to calculate number of days between the two.
Can someone please assist with how I go about getting the date only portion
from the date/time field?
 
D

Douglas J. Steele

Use the DateValue function:

DateValue(DatetimeField)

There's an analogous TimeValue function should you need it as well.
 
G

Guest

Brilliant. It worked. Thank you very much.

Douglas J. Steele said:
Use the DateValue function:

DateValue(DatetimeField)

There's an analogous TimeValue function should you need it as well.
 

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