Purpose
Use this function to add/subtract a provided value in date units from the date variable. You can call this function from the MapBasic window in MapInfo Pro.
Syntax
DateAdd (input_date, value, units)
input_date (Date): A date input parameter
value (Integer) : Positive/Negative value in date units
units (String): Date units from below values.
- day
- month
- year
- week
- century
- decade
Return Value
Date
Example
dim dt as date
dt = 20210524
print DateAdd(dt, 1, "year")
//returns 20220524