Syntax

new_date = WHATDATE(date, days)

Arguments

new_date, date: text

days: integer

Meaning

The argument date must be in Julian (yy.ddd, not supported in Axiell Collections), European (dd/mm/yy, Collections also supports dd-mm-yyyy) or ISO date format (yyyy-mm-dd). new_date is calculated by adding the number of days in the parameter days to the date in the parameter date. If days is negative, new_date will precede date. The new_date calculated must come after 1 January 1900. For date you can also use 'today' or date$(<code>), representing the system date. The system will then automatically fill in the value that is valid at the time the adapl is carried out.
The output date format will be the same as the date format you put in.

Example 1

new_date = whatdate('22/07/88', 100)

Result

new_date is: '30/10/88'

Example 2

new_date = whatdate('30/10/1988', -100)

Result

new_date is: '22/07/1988'

Example 3

new_date = whatdate(date$(8), -100)

Result (if today's date is 1988-10-30)

new_date is: '1988-07-22'

Example 4

new_date = whatdate('today', 1)

Result (if today is 20/05/02)

new_date is: '21/05/02'

See also

DATE$