How To Create Date and Time Formats 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 &...
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.
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.
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.
Page 6
How To Create Date and Time Formats You can use any of the following elements to create a format. 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...
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.
Page 8
How To Create Date and Time Formats The page title displays the word “New” when you create a new format, as shown. To insert the first element of your format, press the Insert Element key. The printer displays a list of the available elements. 69186 Figure 6.
Page 9
How To Create Date and Time Formats The 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. 69211 Figure 8.
How To Create Date and Time Formats Repeat steps 4 to 6 to add the second element, the second separator, and the third element. The completed format is shown below. 69195 Figure 10. Complete format You can see an example of the complete format next to the word “Example” on the Date & Time Editor page.
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.
How To Create Date and Time Formats 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).
Page 13
How To Create Date and Time Formats Press 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. 69189 Figure 15. Edit a string Press the OK key to return to the Edit Strings page, which now shows that the first day of the week is “AAA”.
Page 14
How To Create Date and Time Formats The Edit Strings page shows that all of the text descriptions are clear. 69190 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.
Page 15
How To Create Date and Time Formats To use the Fill In key, first enter a string into the first row of the data. 69214 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.
Page 16
How To Create Date and Time Formats 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. 69191 Figure 20.
How To Create Date and Time Formats 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.
How To Create Date and Time Formats 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.
How To Create Date and Time Formats 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. Format symbols Description Example Left aligned (default) “25 “...
Page 20
How To Create Date and Time Formats The following table describes the time values that are available. Time Description value 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. Second of Day.
Page 21
How To Create Date and Time Formats 3.2.4 If You can use this keyword to compare two values, and make a decision that depends on the comparison. The following examples show how you use this keyword. Example 1 if (moh = 59) use “AAA” In example 1, if the time value ‘minute of hour’...
How To Create Date and Time Formats Example 2 if ((moh = 59) & (dow = 7)) use “AAA” The program in this example has a different layout—see ‘Blocks’. In example 2, the printer uses the text string “AAA” if: •...
How To Create Date and Time Formats If you put a number of lines in a block, the printer processes all the lines together. In this example: • If the time value ‘hour of day’ is less than 12, the logical expression “(hod < 12)” is ‘true’. The printer processes all three lines in the block that follows.
How To Create Date and Time Formats 3.3 Macro examples 3.3.1 Example 1 length = 3 use “ABC” This simple example shows you the smallest structure for a Macro element. The example generates a string that does not change. (Normally you do not use a Macro element for this purpose).
How To Create Date and Time Formats 3.3.5 Example 5 Length = 1 if (mod < 06:00) use “A” if (mod < 14:00) use “B” if (mod < 22:00) use “C” use “A” This example generates a shift code. The printer changes each of the times (06:00, 14:00, and 22:00) to a numeric value (number of minutes).
How To Create Date and Time Formats 3.4 Create a Macro element The following example shows how you use a Macro element in a Date and Time format. In this example, the Date and Time format has the following elements: •...
Page 27
How To Create Date and Time Formats At the Date & Time Editor page, move the highlight to the empty position, as shown in Figure 28 on page 25, then press the Insert Element key. At the Insert Element page, use the Down arrow key to highlight the ‘(Macro)’ element.
Page 28
How To Create Date and Time Formats Press the Edit key to display the Edit Strings page. 69378 Figure 31. Edit Strings page The Edit Strings page shows you all the lines of the Macro program. (All the lines in Figure 31 are empty.) If the Macro is long, you can use the Down arrow key or the [page down] key to see the other lines.
Page 29
How To Create Date and Time Formats Press the OK key to return to the Edit Strings page. 69380 Figure 33. Edit Strings page with first string If you make an error, you can use the Edit String key to change the contents of the string.
Page 30
How To Create Date and Time Formats Press the Exit key to return to the Edit Strings page. 69382 Figure 35. Edit Strings page with two strings The Macro element is complete. Press the Exit key. If there are no errors in your Macro element the printer displays the Date &...
Page 31
How To Create Date and Time Formats If you entered a line that contains an error, the printer displays an information page like the one shown below. 69398 Figure 37. Syntax Error page The Syntax Error page tells you which line contains the error. Press the OK key to return to the Edit Strings page, then correct the problem and try again.
Time elements. The adjustments that you can perform with the Round element are not available if you use only the Date Offset or Time Offset options. (These options are described in the Linx 5900 & 7900 Quick Start Guide.) For example, the printer can print the same date on every day of the week and change the date each week, as shown below.
How To Create Date and Time Formats 4.2 Command parameters You must use a ‘command parameter’ with each Round element, and each command parameter has a number, for example: “NEXTMOH,30” (Note that there is no space between the comma and the number in a command parameter.) The command parameter tells the printer how to adjust the date and time.
Page 34
How To Create Date and Time Formats Command Description BAKMOH,n Like PREVMOH except that if the current minute is equal to n, the time is not changed. BAKHOD,n Like PREVHOD except that if the current hour is equal to n, the time is not changed. BAKDOW,n Like PREVDOW except that if the current day of week is equal to n, the date is not changed.
How To Create Date and Time Formats 4.3 Insert a Round element The following example shows how you use a Round element in a Date and Time format. The command parameter is “BAKDOW,1”. This parameter makes sure that the printed date is always a Monday, like the example on page 31.
Page 36
How To Create Date and Time Formats Press the Edit key then the Edit String key. 69369 Figure 41. Edit String page Enter the required parameter. For this example, enter “BAKDOW,1” then press the OK key to return to the Edit Strings page. 69370 Figure 42.
Page 37
How To Create Date and Time Formats Press the Exit key to return to the Date & Time Editor page. 69371 Figure 43. Date & Time Editor with Round element The Round element is complete. The next items in the Date and Time format are the date elements and the separator.
How To Create Date and Time Formats 4.4 Command parameter examples The following table contains some examples to show how each command parameter changes the printed date or time. In each example, the current time and date is 12:22pm on Friday, 7-April.
Page 39
How To Create Date and Time Formats COMMAND PARAMETER EXAMPLES Command Example Printed time: Printed date: Parameter PREVHOD PREVHOD,15 15:22 6-April PREVHOD,12 12:22 (not changed) 6-April PREVHOD,10 10:22 7-April (not changed) PREVDOW PREVDOW,7 12:22 (not changed) 2-April PREVDOW,5 12:22 (not changed) 31-March PREVDOW,1 12:22 (not changed)
Need help?
Do you have a question about the 5900 and is the answer not in the manual?
Questions and answers