Functions - TimeSpan


Returns an Integer giving the difference between two dates. The difference can be in days, hours, minutes or seconds.

Syntax

TimeSpan(start, end, type)

Parameters

startAny Date value.
endAny Date value.
typeA character determining the type of difference to calculate.

The difference can be in days, hours, minutes or seconds, and the type character is "d", "h", "m" and "s" respectively.

Example

This expression part evaluates to 12:

TimeSpan('02 Apr 2006 12:34:56', '15 Apr 2006 09:08:07', "d")