Skip to main content

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 formatUse this code
Months as 1–12M
Months as 01–12MM
Months as Jan–DecMMM
Months as January–DecemberMMMM
Days as 1–31d
Days as 01–31dd
Days as Sun–Satddd
Days as Sunday–Saturdaydddd
Years as 00–99yy
Years as 1900–9999yyyy

Times

To displayUse this code
Hours as 0–23h
Hours as 00–23hh
Minutes as 0–59m
Minutes as 00–59mm
Seconds as 0–59s
Seconds as 00–59ss
Hours as 4 AMh A
Time as 4:36 PMh:mm A
Fractions of a secondh:mm:ss.00

Results for the input date 2022-09-27 18:00:00.000:

Format StringResults
M/d/yyyy 9/22/2022
dd.MM.yyyy22.09.2022
MMMM d, yyyySeptember 27, 2022
h:mm A6:00 PM
ddddTuesday

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.

CharacterDescription
#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.
0Used 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 textThis can be any text that you want users to see.

Results for the input number 1234.5:

Custom FormatResults
#,###.##;(#,###.##)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.