Function reference
Obtains the date that occurs a specified number of years after or before another date.
RelativeYear ( date , n )
Argument | Description |
DateTime | A date value |
n | An integer indicating the number of years |
Data type: Date
Returns the date that occurs n years after date if n is greater than 0.
Returns the date that occurs n years before date if n is less than 0.
Example 1
This expression returns 2014-02-10 00:00:00
RelativeYear( DateTime(Date(‘2013-02-10’), Time(‘00:00:00’) , 1)
Example 2
This expression returns same date and time as last year.
RelativeYear( DateTime(Today(),Now()) , -1)
Last modified:
29 May 2021