Configuration parameters

The DURATION function consumes a STRING representing an ISO 8601 duration and pushes back a LONG duration in platform time unit.

The ISO 8601 duration can be expessed as PwWdDThHmMsS with:

  • w weeks
  • d days
  • h hours
  • m minutes
  • s or s.ssssss... seconds Each of these values can be either positive or negative. Each value/unit couple can be omitted if the value is zero but at least one value/couple should be defined.

If the consumed ISO 8601 duration has precision under platform time unit, superfluous digits will be ignored. Prior to revision 2.4, precision below milliseconds were always ignored, independently of platform time unit.

DURATION is available since version 1.0.0.

See also



'P1W1D' DURATION // 1 week and 1 day 'P10DT-1H' DURATION // 10 days minus 1 hour 'PT1.234567891S' DURATION // The 567891 nanoseconds are ignored