The timespan object represents a period of time or duration, and includes properties and functions to extract numbers, and functions to convert to a string representation. Note that the formatting output is based on the regional settings of the server or agent where the expression is evaluated.
Name and Parameters | Description | Return Type | Usage Examples | |
---|---|---|---|---|
Format(string format) | Formats a timespan value using standard or custom .Net formatting strings | String | $Server.Now.Format("hh:mm")$ | "23:55" (given the date time "31/12/2000 23:55:333") |
FullAbreviatedText | A full string representation of the timespan using abbreviated unit names | String | ||
Hours | The hours component of the timespan | Integer | ||
LongText | A long string representation of the timespan | String | ||
Milliseconds | The milliseconds component of the timespan | Integer | ||
Minutes | The minutes component of the timespan | Integer | ||
Seconds | The seconds component of the timespan | Integer | ||
ShortAbbreviatedText | A short string representation of the timespan using abbreviated unit names | String | ||
ShortText | A short string representation of the timespan with components separated with colons | String | ||
ShortTextPadding | A short string representation of the timespan with components separated with colons padded with zeros | String | ||
Text | A long string representation of the timespan | String | ||
TotalHours | The total value of the timespan expressed as whole and fractional hours | Number | ||
TotalMilliseconds | The total value of the timespan expressed as whole and fractional milliseconds | Number | ||
TotalMinutes | The total value of the timespan expressed as whole and fractional minutes | Number | ||
TotalSeconds | The total value of the timespan expressed as whole and fractional seconds | Number | ||