To return the seconds elapsed between two DateTime data type values.
TDiff(datetime-expression1 , datetime-expression2)
Type Returned:
Numeric
Returns the seconds elapsed between the two datetime values received as parameters (datetime-expression1 - datetime-expression2).
datetime-expression2 can be greater than datetime-expression1, in this case a negative value is returned.
Notes:
- If the arguments support Milliseconds, the resulting numeric value contains decimals that represent the milliseconds.
- This function calculates the time difference even when any of the parameters have null values.
&Diff = TDiff(&LastTime, Now())
&Diff = TDiff(&DT2, &DT1) // =>> 0.450
Objects: Procedures, Transactions, Web Panels
Languages: Web(.NET, Java), SmartDevices(Android,iOS)
|