46
UBI EasyCoder 301 Direct Protocol – Programmer's Guide Ed. 1
Chapter 6 Setting Up the Printer
The formats for printing dates and time in connection with the com-
mands
DATE$("F")
,
DATEADD$("F")
,
TIME$("F")
and
TIMEADD$("F")
(see chapter 6.5) can be specified by the com-
mands
FORMAT
DATE$
and
FORMAT
TIME$
. With both these com-
mands, you should enter characters representing the various types
of information. The order and number of the characters decides the
format. You can also include separating characters like periods,
slashes, colons, etc. Note that the input string must be enclosed by
double quotation marks.
FORMAT DATE$ "<string>"
Y
Year
M
Month
D
Day
Default:
YYMMDD
Examples:
FORMAT DATE$ "YYYY.MM.DD"
↵
gives e.g.
1997.06.01
FORMAT DATE$ "DD/MM/YY"
↵
gives e.g.
01/06/95
FORMAT TIME$ "<string>"
H
Hour in 24-hour cycle (one digit per H; right-
justified)
h
Hour in 12-hour cycle (one digit per h; right-
justified)
M
Minute (one digit per M; right-justified)
S
Second (one digit per S; right-justified)
P
AM/PM (uppercase) in 12-hour cycle (one
character per P; left-justified)
p
am/pm (lowercase) in 12-hour cycle (one
character per p; left-justified)
Default:
HHMMSS
Examples:
FORMAT TIME$ "HH:MM:SS"
↵
gives e.g.
14:15:37
FORMAT TIME$ "HH.MM"
↵
gives e.g.
14.15
FORMAT TIME$ "hh.MM.SS p"
↵
gives e.g.
2.15.37 p
FORMAT TIME$ "hh.MM PP"
↵
gives e.g.
2.15 PM
4. Date and Time
Format
The date and time formats as
well as the names of months and
weekdays are not saved in the
printer's battery backed-up
memory, but must be transmitted
to the printer after each power-
up.