The time object represents a time value and includes properties and functions to extract numbers, and functions to convert to a string representation. Note that the local time value and formatting output is based on the timezone and regional settings of the server or agent where the expression is evaluated.
Name | Description | Return Type | Usage Examples | |
---|---|---|---|---|
Format | Formats a time 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") |
Hour | The hour component of the time | number | ||
HoursAgo | The number of hours which have passed since the time | number | ||
Millisecond | The millisecond component of the time | number | ||
Minute | The minute component of the time | number | ||
MinutesAgo | The number of minutes which have passed since the time | number | ||
Second | The second component of the time | number | ||
SecondsAgo | The number of seconds which have passed since the time | number | ||
ToLongTimeString() | The time represented in long time format. For the en-AU culture, the standard long time pattern is "h:mm:ss tt". | string | ||
ToShortTimeString() | The time represented in short time format. For the en-AU culture, the standard short time pattern is "h:mm tt" | string | ||