intervalValue()

The datetime value function DateTimeLib.intervalValue returns an INTERVAL value that reflects a string constant or literal and is built based on the default interval mask, which is yyyyMM.

The input string must contain six digits. The first four digits represent the number of years in the interval, and the last two represent the number of months.

If you wish to specify a mask other than yyyyMM, invoke DateTimeLib.intervalValueWithPattern.

  DateTimeLib.intervalValue(intervalAsString STRING in)
  returns (result INTERVAL)
result
A variable of type INTERVAL
intervalAsString
A string constant or literal that contains six digits whose meaning is indicated by the interval mask yyyyMM

Related concepts
Syntax diagram for EGL functions

Related reference
Datetime expressions
INTERVAL
intervalValueWithPattern()

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