*Help* Time calculation problem

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

For some reason, my time calculations are wrong when i run the queiries. if
it is 7am to 9pm, the calculations are wrong. But if its from 3 am to 11 am
or 1 pm to 9 pm, its correct. Do I have to tell it that its a 12 hour time?
here is the formula that I use:

Hours: ((IIf([ClockIn]=True,Null,DateDiff("h",Nz((SELECT Max(Q.[TimeStamp])
FROM TimeClock AS Q WHERE Q.ClockIn = True AND Q.TimeStamp <
T.[TimeStamp]),0),[T].[TimeStamp])))))
 
How are you entering the Time? ie as 7am / 9Pm or 07:00 / 21:00. Have you
tried using the 24 hours format to see if the output is as expected?
 
Back
Top