Date Rounding

G

Guest

I am trying to perform a simple calc on 2 dates.

[Arrival date]-[Termination date]

The result sometimes gives me a number which is 1 more than I expect.

Is this because of the time built into the date field?

How do I modify the query to give me results based on the Date only?

Thanks
 
J

John Vinson

I am trying to perform a simple calc on 2 dates.

[Arrival date]-[Termination date]

The result sometimes gives me a number which is 1 more than I expect.

Is this because of the time built into the date field?

How do I modify the query to give me results based on the Date only?

Thanks

DateDiff("d", [Arrival Date], [Termination Date])

John W. Vinson[MVP]
 
M

Marshall Barton

aMack said:
I am trying to perform a simple calc on 2 dates.

[Arrival date]-[Termination date]

The result sometimes gives me a number which is 1 more than I expect.

Is this because of the time built into the date field?


The time part can do that. Try this instead:

DateDiff("d", DateValue([Arrival date]),
DateValue([Termination date]))
 

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