intervalValueWithPattern()
The dateTimeLib.intervalValueWithPattern() system function returns an INTERVAL value that reflects a string and (optionally) is built based on an interval pattern that you specify. For example, if the pattern is "yyyy", the input string must contain four digits, and those digits represent the number of years represented in the interval.
Syntax
dateTimeLib.intervalValueWithPattern(
intervalAsString STRING? in
[, intervalPattern STRING? in ])
returns (result INTERVAL?)
- intervalAsString
- A string that contains digits whose meaning is indicated by the interval pattern.
- intervalPattern
- Specifies an interval pattern that gives meaning to each digit
in the
first parameter. The default pattern is "yyyyMM". The pattern determines
whether
the return value is a month interval or a second interval. If intervalPattern is
null, the return type defaults to month interval ("yyyyMM"). Valid
characters
for the pattern are
y,M,d,H,m,s,f, andS. For more information, see Date/time masks and format specifiers. - result
- An INTERVAL variable. If intervalAsString is null, the function returns a null value.
Compatibility
| Platform | Issue |
|---|---|
| Rich UI | INTERVAL values are not supported. |