Skip to main content

Interval - script and chart function

Interval() formats a number as a time interval using the format in the system variables in the 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:  

Interval arguments
Argument Description
number The number to be formatted.
format String describing how the resulting interval string is to be formatted. If omitted, the short date format, time format, and decimal separator set in the operating system are used.

Examples:  

The examples below assume the following default settings:

  • Date format setting 1: YY-MM-DD
  • Date format setting 2: hh:mm:ss
  • Number decimal separator: .
Examples and results
Example String Number
Interval( A )
where A=0.375
09:00:00 0.375
Interval( A )
where A=1.375
33:00:00 1.375
Interval( A, 'D hh:mm' )
where A=1.375
1 09:00 1.375
Interval( A-B, 'D hh:mm' )
where A=97-08-06 09:00:00 and B=96-08-06 00:00:00
365 09:00 365.375

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!

Join the Analytics Modernization Program

Remove banner from view

Modernize without compromising your valuable QlikView apps with the Analytics Modernization Program. Click here for more information or reach out: ampquestions@qlik.com