Returns the seconds elapsed between two DateTime data type values.
TDiff(DateTime-expression1 , DateTime-expression2)
Where:
DateTime-expression1 , DateTime-expression2:
Are valid expressions that can involve constants, functions, methods, variables, attributes, Procedures, Inline Formulas.
Both results must match the DateTime data type or Data data type.
Type Returned:
Numeric
Objects: Procedure, Transaction, Web Panel, Panel, Data Provider
Generators: .NET, .NET Framework, Java, Apple, Android, Angular
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(&VarFinalDateTime, &VarInitialDateTime)