TDiff Function

Official Content
This documentation is valid for:

To return the seconds elapsed between two DateTime data type values.

Syntax

TDiff(datetime-expression1 , datetime-expression2)

Type Returned:
Numeric

Description

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.

Example

&Diff = TDiff(&LastTime, Now())

&Diff = TDiff(&DT2, &DT1) // =>> 0.450

Scope

Objects: Procedures, Transactions, Web Panels
Languages: Web(.NET, Java), SmartDevices(Android,iOS)

See Also