Skip to main content

addyears - script and chart function

This function returns the date occurring n years after startdate or, if n is negative, the date occurring n years before startdate.

Syntax:  

AddYears(startdate, n)

Return data type: dual

Arguments:  

AddYears arguments
Argument Description
startdate

The start date as a time stamp, for example '2012-10-12'.

n Number of years as a positive or negative integer.

Examples and results:  

Examples and results
Example Result
addyears ('2010-01-29',3) returns '2013-01-29'
addyears ('2010-01-29',-1) returns '2009-01-29'

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!

Join the Analytics Modernization Program

Remove banner from view

Modernize without compromising your valuable QlikView apps with the Analytics Modernization Program. Click here for more information or reach out: ampquestions@qlik.com