Documentation

Property Format Reference

In this article

Learn how to change the appearance of numbers and dates, using Property Formatting.

Robert van Boesschoten

Published: 14-06-2021

Last updated: 14-06-2021

Formatting and manipulating numbers and dates can be done in multiple ways. The default formatting starts at property level, where you can find the Format option:

Format option shown at a Date Time property


Format Date properties

The following information applies to Date, Date-Time, and Time properties.

Formatting a date property determines how the date is shown on the pages you create with the Page Builder, this option does not apply to the appearance in the Back Office. Setting a format at property level means that this format will be used as the default. In the future, you can overwrite those settings within the Page Builder.

List of all available formats
Format Output Description
`YY` 21 Two-digit year
`YYYY` 2021 Four-digit year
`M` 1-12 The month, beginning at 1
`MM` 01-12 The month, 2-digits
`MMM` Jan-Dec The abbreviated month name
`MMMM` January-December The full month name
`D` 1-31 The day of the month
`DD` 01-31 The day of the month, 2-digits
`d` 0-6 The day of the week, with Sunday as 0
`dd` Su-Sa The min name of the day of the week
`ddd` Sun-Sat The short name of the day of the week
`dddd` Sunday-Saturday The name of the day of the week
`H` 0-23 The hour
`HH` 00-23 The hour, 2-digits
`h` 1-12 The hour, 12-hour clock
`hh` 01-12 The hour, 12-hour clock, 2-digits
`m` 0-59 The minute
`mm` 00-59 The minute, 2-digits
`s` 0-59 The second
`ss` 00-59 The second, 2-digits
`SSS` 000-999 The millisecond, 3-digits
`Z` +05:00 The offset from UTC, ±HH:mm
`ZZ` +0500 The offset from UTC, ±HHmm
`A` AM PM
`a` am pm


Format Number properties

The following information applies to Number, Number with decimal, and Price properties.

Formatting a number property determines how the number is shown on the pages you create with the Page Builder, this option does not apply to the appearance in the Back Office. Setting a format at property level means that this format will be used as the default. In the future, you can overwrite those settings within the Page Builder.

Note: When you want to save more than 2 digits behind the decimal separator, you should change the Scale option as well (shown under the Advanced toggle). Scale determines how many numbers after the decimal separator are saved in the database. Example: When the provided number is 10,12345 and scale is set to 2, the saved number will be 10,12. If scale is set to 5, and format is used to show 2 digits (`0.0,00`), the saved number will be 10,12345, while the shown value in the Page Builder will be 10,12.

List of all available formats

Numbers can be formatted to look like currency, percentages, or even plain old numbers with decimal places, thousands, and abbreviations.

Numbers

Allowed separator symbols are: `, . _ :`

Input number Format mark-up Formatted output
10000 `0.0,00` 10.000,00
10000 `[.]` 10.000,00
10000 `[,]` 10,000,00
10000 `[]` 10000,00
10000 `[.].` 10.000
10000 `[,].` 10,000
10000 `[].` 10000
10000,23 `0,0` 10,000,2
10000,23 `+0,0` +10,000,2
-10000 `0,0.0` -10,000.0
10000,1234 `0.000` 10000.123
100,1234 `00000` 00100
1000,1234 `000000,0` 001,000
10 `000.00` 010.00
10000,1234 `0[.]00000` 10000.12340
0.23 `0.00000` 0.23000
1230974 `0.0a` 1.2m
1460 `0 a` 1 k
-104000 `0a` -104k
1 `0o` 1st
100 `0o` 100th

Using `a` (avarage)

  • if a number is less than 1000 get no postfix
  • if a number is between 1000 and 999999 gets a `k` postfix
  • if a number is greater than 1000000 gets a `m` postfix

Using `o` (ordinal)

Postfixes 1, 2 and 3 with `st`, `nd` and `rd` other numbers get the `th` postfix


Format Price property

Same formatting options count as the number property, this part is specified for currencies.

Any text that is placed between `" "` (quotation marks) will be used as the currency symbol. Also, any currency symbol (supported by a keyboard glyph) can be used without quotation marks.

Input number Format mark-up Formatted output
1000.234 `€0,0.00` €1,000.23
1000,2 `0,0[.]00 €` 1.000,2 €
1001 `€ 0,0[.]00` € 1.001,0
-1000,234 `€0,0` €1000,0
-1000,234 `€ 0.00` € -1000.23
1230974 `€ 0.00 a` € 1.23 m
123,23 `"MyCurrency" 0.00` MyCurrency 123.23

In this article



×

Not sure where to start?

Click here to register and start learning
Register