Format

Convert Numeric, Date, Time, and Timestamp values to text using formatting options, user-specific locale, and timezone settings.

Variants

Format(column)

Returns the text representing the column value using formatting options from the column properties, user-specific locale, and timezone settings.

Parameters

column
The column whose value you need to convert to text. Allowed column types are: Numeric, Date, Time, Timestamp.

Returns

Text

Examples

Format(Date date, Text format)

Returns the text representation of the date using the specified format string.

Parameters

date
The date value you need to convert to text.
format
The date format string. You can specify one of the following format strings to convey the meaning:
Format Meaning
"d" Short Date
"D" Long Date
"M" Month Day
"Y" Year Month

This function supports several additional standard and custom date format strings.

Returns

Text

Examples

Format(Date date, Text format, Text culture)

Returns the text representation of the date using the specified format string and culture.

Parameters

date
The date value you need to convert to text.
format
The date format string.
culture
The culture name.

Returns

Text

Examples

Format(Numeric number, Text format)

Returns the text representation of the number using the specified format string.

Parameters

number
The numeric value you need to convert to text.
format
The numeric format string. You can specify one of the following format strings to convey the meaning:
Format Meaning
"$#" Unit to the left, no digit grouping, hide zero values, no fractional part
"#,#" Digit grouping, hide zero values, no fractional part
"#,0" Digit grouping, display zero values, no fractional part
"0" No digit grouping, display zero value, no fractional part. This is the default format for Numeric columns
"0%" Unit to the right, no digit grouping, display zero values, no fractional part, multiply value by 100. This is the default format for Numeric - Percent columns.
"$#,#.####" Unit to the left, digit grouping, hide zero values, 4 fractional digits, trim trailing zeroes
"-$#,0.00" Unit between sign and number, digit grouping, display zero values, 2 fractional digits, display trailing zeros. This is the default format for Numeric - Currency columns.

This function supports a number of additional standard and custom numeric format strings.

Returns

Text

Examples

Format(Numeric number, Text format, Text unit)

Returns the text representation of the number using the specified format string and unit string.

Parameters

number
The numeric value you need to convert to text.
format
The numeric format string.
unit
The unit string to use instead of the format string "$" or "%".

Returns

Text

Examples

Format(Numeric number, Text format, Text unit, Text culture)

Returns the text representation of the number using the specified format string, unit string, and culture name.

Parameters

number
The numeric value you need to convert to text.
format
The numeric format string.
unit
The unit string to use instead of the format string "$" or "%".
culture
The culture name.

Returns

Text

Examples

Format(Time time, Text format)

Returns the text representation of the time using the specified format string.

Parameters

time
The time value you need to convert to text.
format
The time format string. You can specify one of the following format strings to return the meaning:
Format Meaning
"t" Short Time
"T" Long Time

This function supports a number of additional standard and custom date format strings.

Returns

Text

Examples

Format(Time time, Text format, Text culture)

Returns the text representation of the time using the specified format string and culture name.

Parameters

time
The time value you need to convert to text.
format
The time format string.
culture
The culture name.

Returns

Text

Examples

Format(Timestamp timestamp, Text format)

Returns the text representation of the timestamp using the specified format string.

Parameters

time
The timestamp value you need to convert to text.
format
The time format string. You can specify one of the following format strings to return the meaning:
Format Meaning
"g" Short Date Short Time
"G" Short Date Long Time
"f" Date Short Time
"F" Long Date Long Time

This function supports a number of additional standard and custom date format strings.

Returns

Text

Examples

Format(Timestamp timestamp, Text format, Text culture)

Returns the text representation of the timestamp using the specified format string and culture name.

Parameters

time
The timestamp value you need to convert to text.
format
The time format string.
culture
The culture name.

Returns

Text

Examples