TimeDif$

Takes two parameters, Source, Value

Description:

Calculates the difference in Time or DateTime between the Source and Value parameters.

The Source and Values parameters must be either a proper time value, or a proper datetime value as supported by the [DateTime] attribute. The output resolution will be that of the highest resolution of the two input parameters, e.g., if one or both of the input parameters includes seconds, the output will include seconds.

Note: When working with days only, the Greg$ and Greg% functions may be preferred.

Examples:

[New] Source      = "2022-03-01 13:30"
[New] Value = "2022-03-02 15:30"
[New] DateTimeDif = TimeDif$ Source, Value

Html DateTimeDif 'equal to "0000-00-01 02:00"
[New] Source      = "13:30"
[New] Value = "15:30"
[New] TimeDif = TimeDif$ Source, Value

Html TimeDif 'equal to "02:00"