intervalValueWithPattern()

The datetime value function DateTimeLib.intervalValueWithPattern returns an INTERVAL value that reflects a string constant or literal and (optionally) is built based on an interval mask that you specify. If the mask is yyyy, for example, the input string must contain four digits, and those digits represent the number of years represented in the interval.

  DateTimeLib.intervalValueWithPattern(
    intervalAsString STRING in
    [, intervalMask STRING in
    ])
  returns (result INTERVAL)
result
A variable of type INTERVAL.
intervalAsString
A string constant or literal that contains digits whose meaning is indicated by the interval mask.
intervalMask
Specifies an interval mask that gives meaning to each digit in the first parameter. The default mask is yyyyMM. For other details, see INTERVAL.

Related concepts
Syntax diagram for EGL functions

Related reference
Datetime expressions
INTERVAL

Feedback
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.