Formatting DateDiff hh:nn:ss

jpl458

Well-known member
Local time
Today, 09:58
Joined
Mar 30, 2012
Messages
1,200
I have the following expression in a query in the QBE grid:

Code:
Dur:  Format ( DateDiff ("s", [TimeValue(dteCreated]), [TimeValue(dteModified]),  hh:nn:ss" ) AS HH_NN_SS

Trying to calc the duration between 2 times;

Get this error

1674321653747.png

It must be something I am overlooking, but I can't see it.
 
Did you forget the opening quotes for the second Format argument?

Also, don't think you need the "AS" part.
 
4 left parenthesis, 3 right.
 
The process is unclear. Seconds (from the difference) cannot be converted directly into the format used.
Code:
Format(dteModified - dteCreated, "hh:nn:ss")
... shows times less than 24 hours.
 
Last edited:
... whereby the question arises why one should take a detour via seconds if one wants to have an entry in hh:nn:ss.
 

Users who are viewing this thread

Back
Top Bottom