Skip to main content Skip to complementary content

Interval# - script and chart function

Interval#() evaluates a text expression as a time interval in the format set in the operating system, by default, or in the format specified in the second argument, if supplied.

Syntax:  

Interval#(text[, format])

Return data type: dual

Arguments
Argument Description
text The text string to be evaluated.
format String describing the expected input format to use when converting the string to a numeric interval.

If omitted, the time format and decimal separator set in the operating system are used.

The Interval# function supports many format options for different time structures, for example:

hh:mm—Simple Hours and Minutes

hh:mm:ss—Hours, Minutes, and Seconds

d hh:mm—Days, Hours, and Minutes

Descriptions for number and time formats

The Interval# function converts a text time interval to a numeric equivalent.

Example: Chart expressions
Example Result
Interval#( '12:30', 'hh:mm' ) Returns the numeric value 0.5208, which is 12.5 hours when converted to a day fraction.
Interval#( '1 05', 'd hh' ) Returns a numeric representation equivalent to 1.2083 days.

Example - Interval# fundamentals

Example - Interval# 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!