Numeric, date and Boolean data formats
A format is an attribute that can be associated with numeric, date or Boolean data; it allows you to intervene in the representation of this data at the time of printing. Formats are useful in the format editor, as well as in the headers and footers of pay slips and settlements.
This is the format used to print a date as "January 25, 2024", for example, rather than "25.1.24".
The format is a character string that must be entered immediately after the name of the field to be formatted, separated by a slash, in the form :
<File:field/format>
The § character is reserved for future extensions. It must not be used to write a format.
Digital type
The following codes are used in the format writing syntax: the hash (#), the zero (0), the circumflex (^) and the asterisk (*). The other characters that make up the format are displayed as they are (the thousands separator, for example).
Examples: with 1236.7
Format | Formatted number |
#####0 | 1237 |
###'###'##0.00 | 1'236.70 |
###'##0.00 Frs | 1'236.70 Frs |
00000000 | 00001236 |
000'000.000 | 001'236.700 |
^^^'^^^.00 | 1236.70 |
******.** | **1236.7* |
The hash (#)
The format's sharps are replaced by the numerical value's digits when displayed. When the number of digits is less than the number of sharps, the remaining sharps are removed, as are any unnecessary characters, such as the thousands separator.
The zero (0)
The zeros in the format are replaced by the digits of the numerical value when displayed. When the number of digits is less than the number of zeros, the remaining zeros are displayed.
The circumflex accent (^)
Circumflex accents in the format are replaced by the digits of the numerical value when displayed. When the number of digits is less than the number of circumflex accents, the remaining circumflex accents are replaced by spaces.
Asterisk (*)
Format asterisks are replaced by numerical value digits when displayed. When the number of digits is less than the number of asterisks, the remaining asterisks are displayed.
Date Type
You can individually format the day, month and year of a date by writing, for example:
<File:date/d mmmm yy>
Examples : 6th February 2024
Format | Formatted date |
j | 6 |
jj | 06 |
jjj | tue |
Jjj | Tue |
JJJ | TUE |
Jjjj | Tuesday |
m | 2 |
mm | 02 |
mmm | feb |
Mmm | Feb |
MMM | FEB |
Mmmm | February |
aa | 24 |
aaaa | 2024 |
jj mm aa | 06 02 24 |
MMMM j aa | FEBRUARY 6 24 |
j mmmm aaaa | 6 february 2024 |
Jjjj j mmmm aaaa | Tuesday 6 february 2024 |
Boolean Type
A Boolean field can only take 2 values: 1 or 0. The format below will print text1 if the field contains 1, or text2 if it contains 0.
<File:boolean/text1;;text2>
You must enter the 2 semicolons between text1 and text2.
Example: <Employees:Gender/Mister;;Ms.>
If you don't specify a format, the program will print "Yes" if the item is 1, or "No" if it is 0, except for the Gender field in the Employees file, for which the values printed will be "Male" or "Female" respectively.
Special codes
In the header or footer of the settlements, or in the format editor, the employees file offers a special code in addition to the file fields. This code enables you to print data for multiple-value fields. In the current version of the software, only the entry/exit date section of the employees file can be used. The syntax is as follows:
<Employees:Special code/Dxy>
1rs character | Letter | D |
2nd character | Digit | from 1 to 6 |
3rd character | Digit | 1 or 2 |
Meaning of special codes
2nd character (x):
1 | all entry dates |
2 | entry dates for the current year |
3 | last date of entry |
4 | all exit dates |
5 | exit dates for the current year |
6 | last date of exit |
If there are several values, they are separated by a Return.
3rd character (y):
1 | (only if x = 2,3,5 or 6) |
if the entry date is prior to the current year, it is replaced by the date of January 1 of the current year. If the exit date is after the current year, or equal to 00.00.00, it is replaced by the date of December 31 of the current year. |
|
2 | (only if x = 2,3,5 or 6) |
if the entry date is earlier than the current year, or if the exit date is later than the current year or equal to |
Example: <Employees:Special code/D21>