Enso Custom Formats
Enso enables you to format dates, times, numbers and boolean values using custom formats within the format
component. Enso also allows you to parse values from text to dates, times, numbers and boolean values using custom formats within the parse
component.
Enso comes with a number of pre-defined formats that you can choose from. However, Enso also supports custom formats.
The Enso parse
component also allows you to use custom formats when parsing text to date, time and datetime columns.
Below is how a custom format would appear in a format
component:
![Format Component](img/format component.png)
In this case, the [Date]
column contains ISO formatted dates, in the format 2022-09-27 18:00:00.000. By using the custom format dddd MMMM d, yyyy
we present the date in the specific way that we prefer.
Overview of date and time formats
Enso uses an ISO standard date and time. Therefore dates appear as, September 27, 2022 at 6 p.m. is represented as 2022-09-27 18:00:00.000.
Using Enso's format
component For example, format your dates and times using custom formats, made up of characters below.
Dates
To format | Use this code |
---|---|
Months as 1–12 | M |
Months as 01–12 | MM |
Months as Jan–Dec | MMM |
Months as January–December | MMMM |
Days as 1–31 | d |
Days as 01–31 | dd |
Days as Sun–Sat | ddd |
Days as Sunday–Saturday | dddd |
Years as 00–99 | yy |
Years as 1900–9999 | yyyy |
Times
To display | Use this code |
---|---|
Hours as 0–23 | h |
Hours as 00–23 | hh |
Minutes as 0–59 | m |
Minutes as 00–59 | mm |
Seconds as 0–59 | s |
Seconds as 00–59 | ss |
Hours as 4 AM | h A |
Time as 4:36 PM | h:mm A |
Fractions of a second | h:mm:ss.00 |
Results for the input date 2022-09-27 18:00:00.000:
Format String | Results |
---|---|
M/d/yyyy | 9/22/2022 |
dd.MM.yyyy | 22.09.2022 |
MMMM d, yyyy | September 27, 2022 |
h:mm A | 6:00 PM |
dddd | Tuesday |
Numbers and Currency
Overview of number and currency formats
To create a custom format, you’ll enter various characters in the Format property of a table field. The characters can be placeholders (such as 0 and #), separators (such as periods and commas), literal characters based on how you want the formatting to be. Note that format
converts numbers to strings, so sorting, math functions, and other characteristics will be affected.
You can specify formats for two types of numeric values — positive and negative. If you choose to create a format for both types of values, you must put the format for positive values firstand the format for negative values second. These fomat strings must be separated with a semicolon.
Example of custom formatting: #,###.##;(#,###.##)
Here’s what the formatting means:
-
The number sign
(#)
is a Placeholder for digits. If there are no values, Enso displays a blank space. To display zeroes instead of blank spaces, you must use zeros in your format string as a placeholders. For example: to display 1234 as 1234.00, use the number 0 as the placeholder like this ####.00. -
Positive values with two decimal places.
-
Negative values with two decimal places, in parentheses.
Character | Description |
---|---|
# | Used to display a digit. Each instance of the character represents a position for one number. If no value exists in a position, Enso displays a blank space. Also, can be used as a placeholder. For example, if you apply the format #,### and enter a value of 45 in the field, 45 is displayed. If you enter 12,145 in a field, Enso displays 12,145 — even though you defined only one placeholder to the left of the thousands separator. |
0 | Used to display a digit. Each instance of the character represents a position for one number. If no value exists in a position, Enso displays a zero (0). |
Decimal separator . (period) | Indicates where you want Enso to place the separator character between a whole and decimal part of a number column. |
Thousands separator , (comma) | Indicates where you want Enso to place the separator character between the thousands part of a number column. |
blank spaces, + - $ () | Used to insert blank spaces, math characters (+ -), and financial symbols (¥ £ $) as needed anywhere in your custom format. |
Literal text | This can be any text that you want users to see. |
Results for the input number 1234.5:
Custom Format | Results |
---|---|
#,###.##;(#,###.##) | 1234.5 |
$#,###.00;($#,###.00) | 1234.50 |
+#,###.##;-#,###.## | +1234.5 |
#,###.##%;-#,###.##% | 1234.5% |
Boolean values
Booleans have two possible values, True
or False
. Standard formats supported by Enso are Yes|No and 1|0.
Custom formats have a pipe character ("|"), where the left side of the pipe contains the True
string and the right side contains the False
string.
For example:
- On|Off
- T|F
- Y|N
- Yep|Nope
- Win|Loss
are all valid format strings.