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
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 |
The Interval# function converts a text time interval to a numeric equivalent.
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. |