17.08.2013 Views

Contents, cont'd. - Intermec

Contents, cont'd. - Intermec

Contents, cont'd. - Intermec

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

DATEADD$<br />

Chapter 2 Program Instructions<br />

Field of Application Function returning a new date after a number of days have been added<br />

to, or subtracted from, the current date or optionally a specified date.<br />

Syntax DATEADD$([,][,])<br />

1 2<br />

1 is any date given according to the DATE$ format, which a<br />

certain number of days should be added to or subtracted<br />

from.<br />

is the number of days to be added to (or subtracted from) the<br />

2<br />

current date or optionally the date specified by . 1<br />

is an optional flag "F", indicating that the date will be returned<br />

according to the format specified by FORMAT DATE$.<br />

Remarks The original date () should be entered according to the syntax for the<br />

1<br />

DATE$ variable, i.e. in the order YYMMDD, where:<br />

YY = Year Last two digits (e.g. 1999 = 99)<br />

MM = Month Two digits (01–12)<br />

DD = Day Two digits (01–28|29|30|31)<br />

Example: June 1, 1999 is entered as "990601".<br />

The built-in calendar corrects illegal values for the years 1980 – 2048, e.g. the<br />

illegal date 991232 will be corrected to 000101.<br />

The number of days to be added or subtracted should be specified as a positive<br />

or negative numeric expression respectively.<br />

If no "F" flag is included in the DATEADD$ function, the result will be<br />

returned according to the DATE$ format, see above.<br />

If the DATEADD$ function includes an "F" flag, the result will be returned<br />

in the format specified by FORMAT DATE$.<br />

Example 10 DATE$ = "990610"<br />

20 A%=15<br />

30 B%=-10<br />

40 FORMAT DATE$ "DD/MM/YY"<br />

50 PRINT DATEADD$("990101",A%)<br />

60 PRINT DATEADD$("990101",A%,"F")<br />

70 PRINT DATEADD$(B%,"F")<br />

RUN<br />

990116<br />

16/01/99<br />

31/05/99<br />

yields:<br />

<strong>Intermec</strong> Fingerprint 7.2 – Reference Manual Ed. 3 56

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!