Change the Format of a Numeric, Date or Date-Time Field
Required Permissions
This section requires the Application Designer permission from your Domain's administrator.
Check What are the Design Tasks? to learn more about permissions to work with Design Mode and other tools.
Abstract
Learn how to customize the format to display dates, date-times, and numbers in your application. This document provides also information about the syntax to customize the Numeric, Date, and Date Time fields' format.
How to Change the Format¶
The format is how an application's table represents a particular data type. As Designer, you can select how certain data types (Numeric, Date, and DateTime) appear to the user.
Note
The procedure is the same for both Master and Detail tables.
For a Detail Table, you find the same interface by going into Details > [Desired Detail table] > Configure.
The action leads you to an interface that behaves like that of the Master Table in the Master sub-panel.
For more information about Details, check How to Attach a Table with Further Information to a Row: Detail Tables.
Follow the steps below to change the format of a Date, Date-Time or Numeric field.
Note
The procedure to change format is the same for Date, Date-Time or Numeric field. Between Date, Date-Time or Numeric fields changes only the presets options available.
-
In Design Mode, go to the table settings containing the Date, Date-Time or Numeric fields you want to configure.
-
In the table settings under the View Format column, you can view the fields which format you can change.
Click on the drop-down list under View Format corresponding to the field which format you want to change.
Each type of field (Date, Date-Time or Numeric field) offers different presets you can choose from. If you need a customized format for a Date, Date-Time or Numeric field, click on Custom Format from the drop-down list.
The action opens the Custom Format window. In the Custom Format window, you can customize the format.
- (1) Syntax reference to compose your own format. Varies according to the field type (Date, Date-Time or Numeric field).
- (2) Format textbox where you can type your custom format using the syntax from (1).
- (3) The preview of the format.
- (4) The button restores the previous custom format.
- (5) Confirms the changes.
- (6) Aborts the changes.
Type your custom format and click on the Confirm button. Check Custom Format Syntax for more information about the syntax to design your own custom format.
-
Click on the Save button to save the changes made. You find the Save button in the upper-left corner of the Design Mode.
Success
You have the changed the format to display the data of Date, Date-Time or Numeric field.
Formatting a Field according to Conditions¶
Learn where to insert a Formula introducing conditions for formatting fields in Design Mode.
-
In the Table panel on the table you want to customize, click on the Restrictions button. The action leads to the Restrictions panel.
-
Under the Restrictions column, click in the Format Type Formula button in correspondence to the field you want to configure.
The action opens the Formula Editor and you will be able to insert a formula to manage the formatting.
See Custom Format Syntax to learn how to write the Strings with the format.
Custom Format Syntax¶
Learn the syntax to customize a field's format according to your needs.
If the Designer have special requirements for the Date, DateTime or Numeric format, they can customize the format like step 2 from the How to Change the Format section.
Below the syntax to compose the Custom Format for Numeric, Date, and DateTime data.
Numeric Fields¶
Here the syntax to format the Numeric fields' data. Chain the symbols to obtain the desired format.
Symbol | Result |
---|---|
# | The digit substitutes the number sign. If there is no digit in that place, leaves empty. |
0 | The digit substitutes the number sign. If there is no digit in that place, inserts a 0. |
. | Decimal Separator in US format. |
, | Thousands Separator in US format. |
% | Multiplies the number by 100 and adds percentage symbol at the end. |
$ | Insert the currency symbol. Depends on currency culture settings. |
\ | Introduces an escape sequence in the format. |
'String' | Write a String between Single Quotes. |
Info
eLegere assumes the US Standard to represent decimals (.
) and thousands groups (,
).
If you want the European standard with the decimal comma (e.g. 100.000,50
), enable the Invert decimals and thousands separator representation toggle switch. The action inverts points and commas.
eLegere doesn't support the decimal comma in the format directly; e.g. writing 0.000,00##
doesn't work. You need to use the decimal point (.
) then the toggle switch.
Note
You can employ the same symbols in formulas in Design Mode > Table > Restrictions for the Format Type Formulas.
If you want to specify either the US Standard or the European standard according to a condition in a Numeric Format Type Formula, write them within the functions as follows:
- US Format (point for decimal, comma for thousands groups):
{0:,#.00##}
- European Format (comma for decimal, point for thousands groups):
{1:,#.00##}
See in the Format a Numeric Cell according to the Currency in Formula Use Cases as example.
Date Fields¶
Here the syntax to format the Date fields' data. Chain the conventions to obtain the desired result.
Symbol | Result |
---|---|
d | Represents the day as single digit (1 to 31). |
dd | Represents the day with two digits (01 to 31). |
ddd | Abbreviated day of the week (Tue, Wed, Fri). |
M | Represents the month with one digit (1 to 12). |
MM | Represents the month with two digits (01 to 12). |
MMM | Abbreviated day of the month (Jan, Jun, Sep). |
MMMM | Represents the full month's name. (January, June, September). |
yy | Represents a year using its last two digits (2024 : 24). |
yyyy | Inserts the full year (2024). |
'String' | Write a string between single quotes. |
DateTime Fields¶
Here the syntax to format the Date fields' data. Chain the conventions to obtain the desired result.
Symbol | Result |
---|---|
d | Represents the day as single digit (1 to 31). |
dd | Represents the day with two digits (01 to 31). |
ddd | Abbreviated day of the week (Tue, Wed, Fri). |
M | Represents the month with one digit (1 to 12). |
MM | Represents the month with two digits (01 to 12). |
MMM | Abbreviated day of the month (Jan, Jun, Sep). |
MMMM | Represents the full month's name. (January, June, September). |
yy | Represents a year using its last two digits (2024 : 24). |
yyyy | Inserts the full year (2024). |
'String' | Write a string between single quotes. |
h | Represents the hour using the 12-hour clock (1 to 12). |
hh | Represents the hour using the 12-hour clock and the 0 (01 to 12). |
H | Represents the hour using the 24-hour clock (1 to 23). |
HH | Represents the hour using the 24-hour clock and the 0 (01 to 23). |
m | Represents the minutes from 0 through 59. |
mm | Represents the minutes from 00 through 59. |
s | Represents the seconds from 0 through 59. |
ss | Represents the seconds from 00 through 59. |
tt | Inserts the AM/PM in 12-hour clock. |
zzz | UTC time offset (+02.00) |