Skip to main content Skip to complementary content

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

Arguments
Argument Description
text The text string to be evaluated.
format

String describing the format of the text string to be evaluated. 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.​

Descriptions for number and time formats

Example: Chart expressions
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'.

Example - Time# fundamentals

Example - Time# scenario

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!