Programming instructions

Intermec Fingerprint v7.61 Programmers Reference Manual Ed. 7 59
Chapter 2 Program Instructions
DATEADD$
Field of Application
Function returning a new date after a number of days have been
added to, or subtracted from, the current date or optionally a
speci ed date.
Syntax DATEADD$([<sexp
1
>,]<nexp>[,<sexp
2
>])
<sexp
1
> is any date given according to the DATE$ format, which a
certain number of days should be added to or subtracted
from.
<nexp> is the number of days to be added to (or subtracted
from) the current date or optionally the date speci ed
by <sexp
1
>.
<sexp
2
> is an optional ag "F", indicating that the date will be returned
according to the format speci ed by FORMAT DATE$.
Remarks
The original date (<sexp
1
>) should be entered according to the syntax for the
DATE$ variable, that is in the order YYMMDD, where:
YY = Year Last two digits (for example 2000 = 00)
MM = Month Two digits (01-12)
DD = Day Two digits (01-28|29|30|31)
Example: December 1, 2000 is entered as "001201".
The built-in calendar corrects illegal values for the years 1980-2048, for
example the illegal date 001232 will be corrected to 010101.
The number of days to be added or subtracted should be speci ed as a
positive or negative numeric expression respectively.
If no "F" ag is included in the DATEADD$ function, the result will be
returned according to the DATE$ format, see above.
If the DATEADD$ function includes an "F" ag, the result will be returned
in the format speci ed by FORMAT DATE$.
Example
10 DATE$ = "001201"
20 A%=15
30 B%=-10
40 FORMAT DATE$ "DD/MM/YY"
50 PRINT DATEADD$("001201",A%)
60 PRINT DATEADD$("001201",A%,"F")
70 PRINT DATEADD$(B%,"F")
RUN
yields:
001216
16/12/00
21/11/00