Intermec PM4i Fingerprint Developer's Guide (old) - Page 134
Setting the Date and Time, Reading the Clock and Calendar
View all Intermec PM4i manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 134 highlights
Chapter 7 - Controlling the Printer Setting the Date and Time Some Intermec printers are equipped with a real-time clock (RTC) with battery backup. If an RTC is installed, the internal clock is updated from the RTC at each startup. If no RTC is installed, you need to manually set the clock using either a DATE$ or a TIME$ variable, or an error occurs when trying to read the date or time. 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 fitted, until a power off or REBOOT causes the date and time values to be lost. The built-in calendar runs from 1980 through 2048 and corrects illegal values automatically (for example, 081232 is corrected to 090101). In addition to the standard formats (YYMMDD and HHMMSS), other formats for date and time can be specified by these Fingerprint commands: • FORMAT DATE$ • FORMAT TIME$ • NAME DATE$ • NAME WEEKDAY$ Reading the Clock and Calendar These Fingerprint commands are used to read the clock and calendar: • =DATE$ • =DATE$("F") - Returns the current date in the format specified by FORMAT DATE$ to a string variable. • =TIME$ • =TIME$("F") - Returns the current time in the format specified by FORMAT TIME$ to a string variable. • DATEADD$ • TIMEADD$ • DATEDIFF • TIMEDIFF • WEEKDAY • WEEKDAY$ - Returns the name of the weekday of a specified date in plain text according to the weekday names specified by NAME WEEKDAY$, or if such a name is missing, the full name in English. • WEEKNUMBER • TICKS In most cases, you can specify the current date or time using DATE$ or TIME$ respectively, as in this example: 118 Intermec Fingerprint Developer's Guide