Search

Add Years To Date

Last Updated: May 10, 2022

Articles

Use this function to add years to the input date.

Syntax

Add Years To Date (no_of_years, date_format, input_date)

Parameters

Input Parameter Name Description
no_of_years Number of years to be added
date_format Date Format of the input_date parameter
To know more about Date Format, click here.
input_date Date in string format

Returns

Return value Description
Date Returns the modified date in the same format specified in date_format

Sample

Add Years To Date (2, %d/%m/%Y, 28/03/2021)

  • Adds 2 years to the date 28/03/2021 in the format %d/%m/%Y.
    Returns 28/03/2023.

To view all the Date functions, click here.

Did you find what you were looking for?