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 of the time 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. The output for the number of days will be a single number; it will not be expressed as a date.

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 "01 02:00"
[New] Source      = "13:30"
[New] Value = "15:30"
[New] TimeDif = TimeDif$ Source, Value

Html TimeDif 'equal to "02:00"