years and months duration

FEEL built-in function · Conversion functions

years and months duration(from, to)

Returns the duration between two dates as whole years and months, dropping smaller units.

Parameters

ParameterTypeDescription
fromdatestart date
todateend date

Examples

years and months duration(date("2024-01-10"), date("2026-07-24"))

Related functions

duration

Defined by the OMG DMN 1.6 specification, chapter 10.3.4 (built-in functions).