Summary

This article defines the instruction iso8601Duration.

Table of Contents


Instruction iso8601Duration

Overview

Returns the duration between two time points in ISO8601 duration format. The specification of the from time point and the to time point is similar to function iso8601Date.
The “from time point” is specified with variables:

  • fromQst
  • fromQstDate
  • fromQstTime
  • fromConst
  • fromConstDate
  • fromConstTime

The “to time point” is specified with variables:

  • toQst
  • toQstDate
  • toQstTime
  • toConst
  • toConstDate
  • toConstTime

The duration works only on date fields that exist in both time points. Example for partial dates: When “2010″ is compared to “2010-06-06″, then effectively only “2010″ is compared to “2010″, as month and day are not available in both fields. When “????-06-01″ is compared to “2010-06-06″, then effectively only “06-01″ is compared to “06-06″, as the year is not available in both fields.

When year values are used, then the period string might be negative, if the from value is after the to value. Example: from: “2010″, to: “2000″ will result in “P-10Y”. However, when no year is specified, then no negative value is returned. Instead a rollover might be used to calculate the result. Example, where only time values are used: from: “23:00:00″, to: “01:00:10″ will result in a duration “PT2H10S”, which means 2 hours and 10 seconds. A rollover to the next day is assumed here.
When no from or no to point is available the instruction returns an empty string.

Question Id

Unused.

Value

Unused.

Input value

Unused.

Examples

Form Type IdQuestion IdInstructionValueColumn NumberColumn TitleData Type
&&start
$>&&end
$>
setVarQst
$>setVarQst
$>iso8601Duration
fromQstDate
$>toQstDate
$>
13EXDUR



Need more help?

Please visit the Fountayn Contact Information page.