Time# - Script and chart function
Time#() evaluates an expression as a time value, in the time format set in the data load script or the operating system, unless a format string is supplied.
Syntax:
time#(text[, format])
Return data type: dual
| Argument | Description |
|---|---|
| text | The text string to be evaluated. |
| format |
String describing the format that should be used to interpret the text string. If omitted, the time format and decimal separator set in the operating system is used. The Time# function supports many format options for different time structures, for example: hh:mm:ss—Formats a time value in a standard time format and display hours, minutes, and seconds with leading zeros. hh:mm TT—Uses a 12-hour format with AM/PM suffix. hh:mm—Shows only hours and minutes, omitting seconds. hh.mm.ss—Time format with different separators, such as a period (.) instead of a colon. hh TT—Includes only hour and AM/PM. hh "Hrs" mm "Mins"—Displays the time with custom text, such as Hrs. |
| Example | Result |
|---|---|
| Time#('09:00:00') | Returns 09:00:00 when the TimeFormat setting is 'hh:mm:ss'. |
| Time#( '09:00:00','hh:mm:ss' ) | Returns 09:00:00 when the format supplied is 'hh:mm:ss'. |
| Time#('03:25 PM', 'hh:mm TT') | Returns 03:25 PM when the format supplied is 'hh:mm TT'. |