DateDiff function calculates difference between two dates and it can return value as years, quarters, months, days, weeks, hours, minutes and so on.
Example:
DateDiff ("h", {Invoice.Orderdate}, CurrentDate)
-calculates how many hours has passed since order, value returned is full hours
First parameter can be i.e.:
"n" for minutes
"s" for seconds
"yyyy" for years
"q" for quarters
To convert numbers to time you can use Time function:
Time(DateDiff ("h", {Invoice.Orderdate}, CurrentDate), DateDiff ("m", {Invoice.Orderdate}, CurrentDate), 0)
-third parameter is for seconds
|