Cognito Forms logo

Timespan functions

TimeSpan represents a time interval, and is the result of subtracting two Date or Time values.

Returns

Name

Description

Number

Days

Returns the days component of the time interval represented by this instance.

Number

Hours

Returns the hours component of the time interval represented by this instance.

Number

Milliseconds

Returns the milliseconds component of the time interval represented by this instance.

Number

Minutes

Returns the minutes component of the time interval represented by this instance.

Number

Seconds

Returns the seconds component of the time interval represented by this instance.

Number

Ticks

Returns the ticks (100 nanoseconds) component of the time interval represented by this instance.

String

ToString(String)

Converts the value of the TimeSpan instance to its equivalent string using the specified format.  Options: “c”(00:00:00), “g”(0:00:00), “G”(0:00:00:00.0000), “hh\:mm\:ss”(00:00:00).

Number

TotalDays

Returns the value of this instance expressed in whole and fractional days.

Number

TotalHours

Returns the value of this instance expressed in whole and fractional hours.

Number

TotalMilliseconds

Returns the value of this instance expressed in whole and fractional milliseconds.

Number

TotalMinutes

Returns the value of this instance expressed in whole and fractional minutes.

Number

TotalSeconds

Returns the value of this instance expressed in whole and fractional seconds.

 

Printable View