datediff wrong values

spleewars

Registered User.
Local time
Today, 11:56
Joined
Jan 28, 2011
Messages
28
in the query i got "in" and "out" and both are short time values

i wrote this formula to calculate the time between IN and OUT:

total: ROUND(datediff("n",[in],[out]/60,2)

but the values are not resolving right: eg: between 20:07 and 20:28 is giving me 0.35...

what is wrong?
 
I do not know if it is a typo in just your post or in the actual expression, but you are missing a ) as indicated below in red:

total: ROUND(datediff("n",[in],[out])/60,2)

BTW, 21 minutes is 0.35 hours which is what the expression is calculating if there was a parenthesis where I indicated.
 
total: ROUND(datediff("n",[in],[out]/60,2)

Change to: Datediff("n",[in],[out])

Result = 21

"n" interval param will convert the internal value to minutes.
 

Users who are viewing this thread

Back
Top Bottom