AFTER |
Scroll |
The AFTER function returns the value of a date, time or timestamp after adding a specified number of days, months, years, minutes, hours and/or seconds to a source date, time or timestamp.
Category
Date / Time
Syntax
AFTER(<date> | <time> | <timestamp>, ['nYY], [nMM], [nDD], [nHH], [nMI], [nSS]' )
Parameter Descriptions
date - This parameter specifies a source date in YYYYMMDD format.
time - This parameter specifies a source time in HHMMSS format or the source timestamp in YYYYMMDDHHMMSS format.
timestamp - This parameter specifies a timestamp in YYYYMMDDHHMMSS format.
[n’YY]' - Specifies the number of years, n, to be added to the date/time value.
[n’MM]' - Specifies the number of months, n, to be added to the date/time value.
[n’DD]' - Specifies the number of days, n, to be added to the date/time value.
[n’HH]' - Specifies the number of hours, n, to be added to the date/time value.
[n’MI]' - Specifies the number of minutes, n, to be added to the date/time value.
[n’SS]' - Specifies the number of seconds, n, to be added to the date/time value.
Example
Add 5 years, 3 months and 2 days to the date 11/27/2012 and map the result to field NEWDATE.
NEWDATE = AFTER (20121127, '5YY', '3MM', '2DD')
Returns a date value of 20180301 and maps the result to the target field.
Add 3 days to date 12/31/2011 and map the result to field NEWDATE.
NEWDATE = AFTER (20001231, '3DD')
Returns the value of 20120103.