format
To format a given value
With the function, you can format numbers, date, and time values as you need them, to use them in text or formula fields.
Note: Format numbers
All entries are optional. If you do not specify anything, nothing will be formatted.
If you want to format numbers with this function, you must specify the defaults for formatting in a certain order:
First, specify whether a prefix should be inserted, e.g. a currency symbol.
Should a 1000 separator be inserted?
Specify whether or how many decimal places you want to display.
Specify a unit, e.g. a currency sign.
Type of decimal place separator, e.g. period (
.
), comma (,
), single quote ('
) or double quotes ("
).Type of 1000 separator, e.g. period (
.
), comma (,
), single quotation mark ('
), double quotation marks ("
) or a space (
Use double quotes (""
) for quotes within a string.
Expected result | Formula |
---|---|
238597 |
|
238597,00 |
|
2387,970 |
|
$2,385.97US |
|
2.385,97 € |
|
Syntax
format(number, string)
format(date, string)
format(date, string, string)
format(appointment, string)
format(appointment, string, string)
format(timestamp, string)
format(timestamp, string, string)
format(time, string)
Return
string
Examples
Your result format may be different depending on your settings.
format(myNumber, formatExpression)
To format a given number as a string.
Result: 2.385,97 €
Ergebnis: $2,385.97US
Result: 0000012345
format(myDate, formatExpression)
To format a given date as a string.
Result:
Mon, May 31, 2021 (with “Date” = 05/31/2021) ((US)
Mon, 31st May 2021 (with “Date” = 31/05/2021) (UK)
format(myDate, formatExpression, language)
To format a given date as a string, where the result shows in a specific language supported by Ninox.
format(myDatetime, formatExpression)
To format a given timestamp as a string.
Result: 1622466387 (on May 31, 2021 15:06)
"X" shows the result without Milliseconds! "x" shows the result with Milliseconds.
format(myAppointment, formatExpression)
To format a given start of an appointment as a string.
format(myAppointment, formatExpression, language)
To format a given start of an appointment as a string, where the result shows in a specific language supported by Ninox.
format(myTime, formatExpression)
To format a given time as a string.
format(myDatetime, formatExpression, language)
To format a given timestamp as a string, where the result shows in a specific language supported by Ninox.
More information about our date and time format expression.
Last updated