Linx 5900 User manual

How To Create Date and Time
Formats
Linx 5900 & 7900

Page 1 of 38 FA69356–2 English
Jun 2013
How To Create Date and Time
Formats
Linx 5900 & 7900
Contents
1 Introduction................................................................................................................................... 2
1.1 Health and Safety ................................................................................................................... 2
2 Date and Time store ..................................................................................................................... 3
2.1 Create a new format ............................................................................................................... 4
2.1.1 Elements and separators................................................................................................ 4
2.1.2 Example.......................................................................................................................... 6
2.1.3 Edit key........................................................................................................................... 9
2.1.4 Manage Dates & Times ................................................................................................ 10
2.1.5 Change the order of the elements ................................................................................ 10
2.1.6 Calendar types ............................................................................................................. 10
2.1.7 Edit Strings ................................................................................................................... 11
3 Macro ........................................................................................................................................... 16
3.1 Introduction ........................................................................................................................... 16
3.2 Macro structure..................................................................................................................... 17
3.2.1 Length........................................................................................................................... 17
3.2.2 Use ............................................................................................................................... 17
3.2.3 Time value .................................................................................................................... 18
3.2.4 If.................................................................................................................................... 20
3.2.5 Blocks ........................................................................................................................... 21
3.2.6 Else............................................................................................................................... 22
3.3 Macro examples ................................................................................................................... 23
3.3.1 Example 1..................................................................................................................... 23
3.3.2 Example 2..................................................................................................................... 23
3.3.3 Example 3..................................................................................................................... 23
3.3.4 Example 4..................................................................................................................... 23
3.3.5 Example 5..................................................................................................................... 24
3.3.6 Example 6..................................................................................................................... 24
3.4 Create a Macro element ....................................................................................................... 25
4 Round .......................................................................................................................................... 31
4.1 Introduction ........................................................................................................................... 31
4.2 Command parameters ..........................................................................................................32
4.3 Insert a Round element ........................................................................................................ 34
4.4 Command parameter examples ........................................................................................... 37

Page 2 of 38 FA69356–2 English
Jun 2013
38
How To Create Date and Time
Formats
Linx 5900 & 7900
1 Introduction
This document shows how you can create a new Date and Time field format for the 7900
printer. It also includes details of available time formats for the 5900 and 7900 printers.
NOTE: You cannot create new Date and Time formats on the 5900 printer.
You need a User Level C password to perform all the tasks that are described in this
document.
1.1 Health and Safety
Make sure that you read and understand the Health and Safety information in the ‘Safety’
section of the Linx 5900 & 7900 Quick Start Guide.

Page 3 of 38 FA69356–2 English
Jun 2013
38
How To Create Date and Time
Formats
Linx 5900 & 7900
2 Date and Time store
In the Linx 5900 & 7900 Quick Start Guide you learnt how use the Message Editor to add a
Date and Time field to your message. You can select any of the default formats to display
the date or time in a different style, as follows.
TIME AND DATE FORMATS: ENGLISH
Format Usage / Example
d (Day of Week digit) 1 through 7
dd (Day of Month) 1 through 31
dd mmm yy 15 DEC 06
dd mmm yyyy 15 DEC 2006
dd.mm.yy 15.12.06
dd/mm/yy 15/12/06
dd/mm/yyyy 15/12/2006 (5900 only)
HH 00 through 23
HH (12hr) 01 through 12
HH:MM 16:35
HH:MM:SS 16:35:57
HH:MMam/pm 04:35 pm
HHMM 0435
HHMM am/pm 0435 pm
jjj (Julian Date USA) 001 through 366
jjj (Julian Date) 001 through 366
MM (Minute) 00 through 59
mm (Month of Year) 1 through 12
mm/dd/yy 12/15/06
mmm (Month) JAN through DEC
mmm dd yy DEC 15 06
mmm dd yyyy DEC 15 2006
SS (Second) 00 through 59
ww (Week of Year) 1 through 53
y (Year of Decade) 0 through 9
yy (Year of Century) 00 through 99
yy.mm.dd 06.12.15
yyyy 2006
yjjj ( Year of Decade + Julian Date) 0 through 9, 001 through 366 (5900 only)
yjjj (USA) (Year of Decade + Julian Date 0 through 9, 001 through 366 (5900 only)
mm (2 letter month of Year) JA, FE, MR, AL, MA, JN, JL, AU, SE, OC, NO, DE (5900 only)
Figure 1. Date and Time formats

Page 4 of 38 FA69356–2 English
Jun 2013
38
How To Create Date and Time
Formats
Linx 5900 & 7900
If you need a special format that is not in this list, follow the steps in this document to build
a customized format.
NOTE: You cannot create new Date and Time formats on the 5900 printer.
2.1 Create a new format
This section shows you how you build a new Date and Time format.
2.1.1 Elements and separators
Each format normally contains some elements and separators as shown in the following
examples:
Format Element 1 Separator Element 2
23-59 HH (24hr) - MM (Minutes)
31/12 dd (Day of Month) / mm (Month)

Page 5 of 38 FA69356–2 English
Jun 2013
38
How To Create Date and Time
Formats
Linx 5900 & 7900
You can use any of the following elements to create a format.
The separators are optional, but if there are no separators, the field is less clear. The
following separators are available:
/:-.,[space]
(These symbols are the default separators, but you can create your own separators.)
In this example, you create the following format for a Date & Time field in your message.
TIME AND DATE FORMAT ELEMENTS
Element type Element name Default style Range
Day of Week day (Day of Week) MON, TUE, WED... MON through SUN
d (Day of Week) 1, 2, 3... 1 through 7
Day of Month dd (Day of Month) 01, 02, 03... 01 through 31
Julian Date jjj (Julian Date) 001, 002, 003... 001 through 366
Week of Year ww (Week of Year) 01, 02, 03... 01 through 53
Month mmm (Month) JAN, FEB, MAR... JAN through DEC
mm (Month) 01, 02, 03... 01 through 12
Year yy (Year) 00, 01, 02... 00 through 99
y (Year) 0, 1, 2... 0 through 9
yyyy (Year) 2000, 2001, 2002... N/A
Seconds SS (Seconds) 00, 01, 02... 00 through 59
Minutes MM (Minutes) 00, 01, 02... 00 through 59
15 minutes 15 min (15 min of day) 01, 02, 03... 01 through 96
30 minutes 30 min (30 min of day) 01, 02, 03... 01 through 48
Hours HH (12hr) 00, 01, 02... 00 through 11
HH (24hr) 00, 01, 02... 00 through 23
Before/After Noon am/pm (Before/After Noon) am, pm am or pm
(Round) (See page 31)
(Macro) (See page 16)
Figure 2. Date and Time format elements
Item Details
Element 1 day (Day of Week)
Separator 1 -
Element 2 HH (24hr)
Separator 2 :
Element 3 MM (Minutes)
Figure 3. Custom format example

Page 6 of 38 FA69356–2 English
Jun 2013
38
How To Create Date and Time
Formats
Linx 5900 & 7900
If the current day is Monday and the current time is 11:59 p.m., your message displays the
following:
“MON-23:59”
The following instructions show how you create this format.
2.1.2 Example
1At the Print Monitor page, select Menu > Stores > Date & Time Store. The printer
displays the Date & Time Store page.
Figure 4. Date & Time Store page
This page displays a list of the existing Date and Time formats.
(You can access this page from the Message Editor but the Edit key and the Manage
Dates & Times key are not displayed.)
NOTE: The Edit key and the Manage Dates & Times key are described later. The
Change Language key in the Date & Time Store page changes the default
formats that are available. For more information, see the Linx 5900 & 7900
Quick Start Guide.
2At the Date & Time Store page, press the New key. The printer displays the Date &
Time Editor page.
Figure 5. Date & Time Editor page
69210
69150

Page 7 of 38 FA69356–2 English
Jun 2013
38
How To Create Date and Time
Formats
Linx 5900 & 7900
The page title displays the word “New” when you create a new format, as shown.
3To insert the first element of your format, press the Insert Element key. The printer
displays a list of the available elements.
Figure 6. Insert Element page
4For this example, the first element that you need is “day (Day of Week)”. Make sure
that this element is highlighted then press the OK key to return to the Date & Time
Editor page:
Figure 7. Date & Time Editor page
The page shows the element that you selected and some examples of the format:
“MON, TUE, WED...”.
NOTES:
1. The days of the week and the months are shown in the default language.
You can change the language that the format uses (see ‘Change Language’
on page 14).
2. You can change the content of any element—see ‘Edit Strings’ on page 11.
69186
69187

Page 8 of 38 FA69356–2 English
Jun 2013
38
How To Create Date and Time
Formats
Linx 5900 & 7900
5The next item that you need is a separator. Use the Down arrow key to move the
highlight to the next row (which is empty) then press the Insert Separator key. The
printer displays the Insert Separator page.
Figure 8. Insert Separator page
6For this example, the first separator that you need is the hyphen (“-”). Use the
Down arrow key to highlight the “-” then press the OK key to return to the Date &
Time Editor page.
Figure 9. First element and separator
69211
69212

Page 9 of 38 FA69356–2 English
Jun 2013
38
How To Create Date and Time
Formats
Linx 5900 & 7900
7Repeat steps 4to 6to add the second element, the second separator, and the third
element. The completed format is shown below.
Figure 10. Complete format
You can see an example of the complete format next to the word “Example” on the Date &
Time Editor page.
Save your format
When the Date and Time format is completed, press the Exit key to display the Save As
page.
Figure 11. Save As page
You can save the format or discard your changes, or change the default name that is shown.
Press the Cancel key to return to the previous page. The box below the default name shows
the names of other formats that you created. If there are no customized formats, the box is
empty as shown in Figure 11.
If you use an existing name, the printer displays a warning that your changes are seen in all
messages that use the format.
2.1.3 Edit key
At the Date & Time Store page (Figure 4 on page 6), you can use an existing format instead
of a blank format when you begin to create a new format. The method you use to build the
format is the same.
69195
69197

Page 10 of 38 FA69356–2 English
Jun 2013
38
How To Create Date and Time
Formats
Linx 5900 & 7900
At the Date & Time Store page, highlight an existing format that is like the format that you
need and press the Edit key. Then you can edit this format and use a new name to save the
changed version.
2.1.4 Manage Dates & Times
You can use the Manage Dates & Times key to copy a format, change a format name, delete
a format, or change the language. (You cannot delete or change the name of any of the
formats that are supplied with the printer.) The Copy option, the Rename option, and the
Delete option are not described in this document. These options are like the options in the
Message Store > Manage Messages page, which is described in the Linx 5900 & 7900 Quick
Start Guide.
2.1.5 Change the order of the elements
You can change the position of the elements in the format. Use the Arrow keys to highlight
an element. Press the [alt] key and the Up or Down arrow key to drag the element towards
the top or bottom of the list.
2.1.6 Calendar types
You can use the Calendar option to select the calendar for your Date & Time format. Press
the Calendar key to display the available calendar types, as follows.
Figure 12. Calendar page
Highlight the required calendar and press the OK key to return to the Date & Time Editor
page.
NOTE: All the elements in a format must use the same calendar.
•Use the Gregorian option if you need a Julian Date element that uses the European
style.
•Use the Gregorian USA option if you need a Julian Date element that uses the
American style.
69196

Page 11 of 38 FA69356–2 English
Jun 2013
38
How To Create Date and Time
Formats
Linx 5900 & 7900
Julian Date formats
The European version of the Julian Date and the American version are different, as shown
in Figure 13. The default Julian Date format that is used depends on the Installation setup
(see How To Change the System Setup).
Figure 13. Julian Date
2.1.7 Edit Strings
The following description applies to the Days of the Week element, but the method is the
same for the other elements.
You can use this page to change the text description for the days of the week. For example
“MON-23:59” becomes “AAA-23:59” and “TUE-08:00” becomes “BBB-08:00”.
NOTE: You can use the following method to edit a separator too, so that you can use a
symbol that is not one of the default separators.
1In the Date & Time Editor page (Figure 7 on page 7), use the arrow keys to
highlight an element. Press the Edit key to display the Edit Strings page.
Figure 14. Edit Strings page
6016
EUROPEAN AMERICAN
Non-Leap Year 1 Jan = Day 001 1 Jan = Day 001
28 Feb = Day 059 28 Feb = Day 059
1 Mar = Day 060 1 Mar = Day 060
31 Dec = Day 365 31 Dec = Day 365
Leap Year 1 Jan = Day 001 1 Jan = Day 001
28 Feb = Day 059 28 Feb = Day 059
29 Feb = Day 366 29 Feb = Day 60
1 Mar = Day 060 1 Mar = Day 061
31 Dec = Day 365 31 Dec = Day 366
69188

Page 12 of 38 FA69356–2 English
Jun 2013
38
How To Create Date and Time
Formats
Linx 5900 & 7900
2Press the Edit String key to display the selected string (“MON” in this example).
Enter the new text “AAA” to overwrite the old text as shown below.
Figure 15. Edit a string
3Press the OK key to return to the Edit Strings page, which now shows that the first
day of the week is “AAA”.
Figure 16. New string: “AAA”
Repeat steps 2and 3if necessary to change the other days of the week, then press
the Exit key to finish.
Clear All Values
To delete all the existing strings in only this element, press the Clear All Values key. This key
does not change the other elements in the format.
69189
69213

Page 13 of 38 FA69356–2 English
Jun 2013
38
How To Create Date and Time
Formats
Linx 5900 & 7900
The Edit Strings page shows that all of the text descriptions are clear.
Figure 17. Edit Strings page
You can enter new text for each string as shown in Figure 15 on page 12.
Default Values
To reset all the strings to their default values, press the Default Values key. In the example
above, “AAA” is reset to “MON”.
Fill In
If you press the Fill In key at the Edit Strings page, the printer automatically enters a string
into every row. The printer uses the first string (or the first two strings) to calculate the
strings for the other rows.
The Fill In key is not available if the printer cannot calculate the other strings.
The string that you enter in the first row or the second row must be one of the following:
•The default name for this item, or the first part of the default name. For example, you
can set the first day of the week to “Monday” or “mOnD”. You cannot use “Mnday”
because the letters are incorrect. You cannot use “Tuesday” because that is the wrong
day.
•A single letter—the printer uses the next letters of the alphabet for the next strings. For
example you can use the sequence “A, B, C...” or “R, S, T...”.
•A whole number—the printer uses the next number for the next string. For example
you can use the sequence “1, 2, 3...” or “527, 528, 529...”.
The difference between the steps can be more than 1. For example:
120, 125, 130, 135,...
To create a sequence like this example, enter the numbers for the first string and the
second string (100 and 125 in this example). The printer calculates the difference
(125 - 120 = 5), and uses this difference to calculate the other numbers.
69190

Page 14 of 38 FA69356–2 English
Jun 2013
38
How To Create Date and Time
Formats
Linx 5900 & 7900
To use the Fill In key, first enter a string into the first row of the data.
Figure 18. Edit String page
Press the OK key to return to the previous page, then press the Fill In key. The printer
copies the capitalization of the first string, as shown in the following example.
Figure 19. Edit Strings page with new defaults
Change Language
NOTE: The Change Language key in the Edit Strings page is different from the Change
Language key in the Date & Time Store page (Figure 4 on page 6).
69214
69215

Page 15 of 38 FA69356–2 English
Jun 2013
38
How To Create Date and Time
Formats
Linx 5900 & 7900
To change the language of the string, press the Change Language key and select the
required language from the list. Press the OK key to return to the Edit Strings page, which
shows the language change.
Figure 20. Change the language
The Change Language key changes only this element of the format.
NOTE: The Change Language key changes a numeric element to a text element. For
example, “d(Day of Week)” changes to “day(Day of Week)”.
Exit
When you have completed the changes to the Day of the Week element, press the Exit key
to return to the Date & Time Editor page.
69191

Page 16 of 38 FA69356–2 English
Jun 2013
38
How To Create Date and Time
Formats
Linx 5900 & 7900
3 Macro
3.1 Introduction
A Macro element is part of a Date and Time format. You use a Macro element to generate a
customized Date and Time format that does not use the standard date or time elements. To
create a Macro element you must write a simple program which controls the text that is
printed. You can write a short and simple program, or a long and complex program.
To use a Macro element, you insert the Macro element into a Date and Time format, as
shown in the following example.
Figure 21. Date and Time format with Macro
This simple example is not useful, but shows you how a Macro element is used. The Date
and Time format in Figure 21 contains the following elements:
•The day of the week (1 to 7)
•A separator (“-”)
•A Macro element
The Macro element tells the printer to print the text string “AAA” after the separator. If the
day of the week is 7, the printed date is “7-AAA”.
NOTE: All the lines of the Macro program are contained in a single line in the Date & Time
Editor page, as shown in Figure 21.
To help you follow the description, the lines in a program are shown in a different font
(‘Courier’), like this example:
This line uses the courier font.
The next section shows you the commands that you can use to make a Macro element. Then
you learn how a Macro element is inserted into a Date and Time format.
69373

Page 17 of 38 FA69356–2 English
Jun 2013
38
How To Create Date and Time
Formats
Linx 5900 & 7900
3.2 Macro structure
A Macro program must contain a minimum of two lines and a maximum of 100 lines. Every
Macro program must contain the following lines:
•A Length command
•A Use command
The Length command must be the first line of your Macro program.
3.2.1 Length
The Length command defines the length of the text string that the Macro element generates.
The length is an integer in the range 1 to 32. For example, to print the text “AAA”, the first
line of the Macro program must be as follows:
length = 3
3.2.2 Use
This command defines the characters that are displayed in the Macro element of the Date
and Time format. When a Use command is performed, the printer ignores any lines that
follow the Use command.
The Use command can generate any of the following:
•A text string
•A number
•A numeric expression
Text
To print a text string, enclose the characters in quotation marks, as follows:
use “AAA”
This command tells the printer to print the text string “AAA”. The length of the text string
must match the length that you defined in the Length command.
Number
To print a number, enclose the number in brackets, as follows:
use (25)
If the number of digits is less than the Length setting, you can add two ‘format’ symbols to
control the alignment of the numbers. For example:
use (25)_#
NOTE: Do not insert a space between the “)” and the format symbols.

Page 18 of 38 FA69356–2 English
Jun 2013
38
How To Create Date and Time
Formats
Linx 5900 & 7900
The following table shows the format symbols that you can use. The table shows an
example for each format that shows how the format changes a 5-character string.
If you do not add the format symbols, the printer uses the default alignment (left aligned).
Numeric expression
A numeric expression is one of the following:
•A number in the range 0 to 999,999,999.
•A time that uses the format “HH:MM” (for example “23:59”). The numeric value is (HH
x 60) + MM.
For example, “23:59” = (23 x 60) + 59 = 1439.
•A time that uses the format “HH:MM:SS” (for example “23:59:30”). The numeric value
is (HH x 3600) + (MM x 60) + SS.
For example, “23:59:30” = (23 x 3600) + (59 x 60) + 30 = 86,370.
•A time value—see below.
You can use some mathematical symbols to build a numeric expression that is more
complex. For example:
(6+10)
(24/2)
(6+10)+(24/2)
You can use any of the following mathematical symbols.
3.2.3 Time value
A time value—for example, “MOH” (Minute of Hour)—generates a number that depends
on the current time. If the time is 23:59, the time value “MOH” generates the number 59.
Format symbols Description Example
#_ Left aligned (default) “25 “
_# Right aligned “ 25”
0# Right aligned, with leading zeros “00025”
Figure 22. Format symbols
Symbol Description
+ Add the two numbers.
- Subtract the second number from the first number.
* Multiply the two numbers.
/ Divide the first number by the second number.
% Calculate the remainder after the first number is divided by the second
number. For example, 28 % 5 = 3.
Figure 23. Numeric operators

Page 19 of 38 FA69356–2 English
Jun 2013
38
How To Create Date and Time
Formats
Linx 5900 & 7900
The following table describes the time values that are available.
For example, if the current day of the month is 31, then (DOM - 10) = 21.
Time
value
Description
SOH Second of Hour. The number of seconds that have passed after the start of the hour. The value
is in the range 0 to 3599.
SOD Second of Day. The number of seconds that have passed after the start of the day (today at
00:00:00). The value is in the range 0 to 86399.
MOH Minute of Hour. The value is in the range 0 to 59.
MOD Minute of Day. The number of minutes that have passed after the start of the day (today at
00:00). The value is in the range 0 to 1439.
MOW Minute of Week. The number of minutes that have passed after the start of the week (Monday
at 00:00). The value is in the range 0 to 10079.
HOD Hour of Day. The value is in the range 0 to 23.
HOW Hour of Week. The number of hours that have passed after the start of the week (Monday at
00:00:00). The value is in the range 0 to 167.
HOM Hour of Month. The number of hours that have passed after the start of the month (1st of
month at 00:00:00). The value is in the range 0 to 744.
DOW Day of Week. The value is 1 for Monday, 2 for Tuesday, …, 7 for Sunday.
DOM Day of Month. The value is in the range 1 to 28, 29, 30 or 31 depending upon the month.
DOY Day of Year. The value is in the range 1 to 365 (or 366 for a leap year).
WOM Week of Month. The value is in the range 1 to 5.
WOY Week of Year. The value is in the range 1 to 53.
MOY Month of Year. The value is in the range 1 to 12.
MOE Month of Decade. The value is in the range 1 to 120.
YOE Year of Decade. The value is in the range 0 to 9.
YOC Year of Century. The value is in the range 0 to 99.
Figure 24. Time values
Other manuals for 5900
8
This manual suits for next models
1
Table of contents
Other Linx Printer manuals