Skip to main content Skip to complementary content

Interval - script and chart function

Interval() formats a number as a time interval using the format in the system variables in the data load script, or the operating system, or a format string, if supplied.

Intervals may be formatted as a time, as days or as a combination of days, hours, minutes, seconds and fractions of seconds.

Syntax:  

Interval(number[, format])

Return data type: dual

Arguments
Argument Description
number The number to be formatted.
format String describing how the resulting interval string is to be formatted. If omitted, the time format and decimal separator, set in the operating system, are used. 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

Example: Chart expressions
Example Result
Interval( 0.375 ) Returns 9:00:00 when the TimeFormat is h:mm:ss.
Interval(.375​, 'hh:mm' )

Returns 9:00 when the format supplied in the function is hh.mm.

Interval( 0.375​, 'd hh' ) Returns 0 09 when the format supplied in the function is d hh.

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!