Intermec PM23c Fingerprint Developer's Guide (PC23d, PC43d/t, PM23c, PM43, PM4 - Page 126
Controlling the Printer, Fingerprint Developer's Guide, respectively, as in this example
View all Intermec PM23c manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 126 highlights
Chapter 7 - Controlling the Printer • =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: WEEKDAY$ (DATE$) TIMEDIFF (TIME$, "120000") The next example shows how the date and time formats are set and the names of months are specified. Finally, a number of date and time parameters printed to the standard OUT channel: 10 FORMAT DATE$ "MMM/DD/YYYY" 20 FORMAT TIME$ "hh.mm pp" 30 NAME DATE$ 1, "Jan":NAME DATE$ 2, "Feb" 40 NAME DATE$ 3, "Mar":NAME DATE$ 4, "Apr" 50 NAME DATE$ 5, "May":NAME DATE$ 6, "Jun" 60 NAME DATE$ 7, "Jul":NAME DATE$ 8, "Aug" 70 NAME DATE$ 9, "Sep":NAME DATE$ 10, "Oct" 80 NAME DATE$ 11, "Nov":NAME DATE$ 12, "Dec" 90 A%=WEEKDAY(DATE$) 100 PRINT WEEKDAY$(DATE$)+""+DATE$("F")+""+TIME$("F") 110 PRINT "Date:",DATE$("F") 120 PRINT "Time:",TIME$("F") 130 PRINT "Weekday:", WEEKDAY$(DATE$) 140 PRINT "Week No.:",WEEKNUMBER (DATE$) 150 PRINT "Day No.:", DATEDIFF ("030101",DATE$) 160 PRINT "Run time:", TICKS\6000;" minutes" 170 IF A%5 THEN PRINT "It is ";WEEKDAY$(DATE$); ". Stay home!" RUN The printer returns (for example): Monday Apr/03/2003 08.00 am Date: Apr/03/2003 Time: 08.00 am Weekday: Thursday Week No.: 14 Day No.: 93 Run time: 1 minutes It is Thursday. Go to work! 114 Fingerprint Developer's Guide