Programming instructions
Intermec Fingerprint v7.61 – Programmer’s Reference Manual Ed. 758
Chapter 2 Program Instructions
DATE$
Field of Application
Variable for setting or returning the current date.
Syntax Setting the date: DATE$=<sexp>
<sexp> sets the current date by a 6-digit number specifying Year,
Month and Day (YYMMDD).
Returning the date: <svar>=DATE$[(<sexp>)]
<svar> returns the current date according to the printer’s calendar.
<sexp> is an optional fl ag "F", indicating that the date will be returned
according to the format specifi ed by FORMAT DATE$.
Remarks
This variable works best if a real-time clock circuit (RTC) is fi tted on the
printer’s CPU board. The RTC is battery backed-up and will keep record of
the time even if the power is turned off or lost.
If no RTC is installed, the internal clock will be used. After startup, an error
will occur when trying to read the date or time before the internal clock has
been manually set by means of either a DATE$ or a TIME$ variable. If only
the date is set, the internal clock starts at 00:00:00 and if only the time
is set, the internal clock starts at Jan 01, 1980. After setting the internal
clock, you can use the DATE$ and TIME$ variables the same way as
when an RTC is fi tted, until a power off or REBOOT causes the date
and time values to be lost.
Date is always entered and, by default, returned 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 format for how the printer will return dates can be changed by means of a
FORMAT DATE$ statement and returned by DATE$("F").
Example
Setting the date and then returning the date in two different formats:
10 DATE$ = "001201" (sets date)
20 FORMAT DATE$ "DD/MM/YY" (sets date format)
30 PRINT DATE$ (returns unformatted date)
40 PRINT DATE$("F") (returns formatted date)
RUN
yields:
001201
01/12/00