Date Diff Problem / Please help.

Jkittle

Registered User.
Local time
Today, 08:10
Joined
Sep 25, 2007
Messages
100
I'm using the date diff .... DateDiff("h",[Start time],[End time]) in a query and then I report the results in a report. I have run into a problem for the first time. I had a start time of 7:00pm, and an end time of 7:00am. This was calculated in the query as (-12) which is messing up my cost formula.

How do I resolve this?

Jerry
 
I'm using the date diff .... DateDiff("h",[Start time],[End time]) in a query and then I report the results in a report. I have run into a problem for the first time. I had a start time of 7:00pm, and an end time of 7:00am. This was calculated in the query as (-12) which is messing up my cost formula.

How do I resolve this?

Jerry

Use the Absolute value:

Abs(DateDiff("h",[Start time],[End time]))
 
Bob,

Thank you very much! Worked great.
 

Users who are viewing this thread

Back
Top Bottom