Format

This Flow Script tutorial explains how to use the Format function with syntax and examples.

Description

The Format function formats x as a string, using the given pattern.

Syntax

‌The syntax for the Format function is:

Format(x, pattern)

Format(x, pattern, locale) // Flow version 6.14.3 and up

Parameters

x - the value to format.

pattern - the format, see Formats.

locale (optional) - a language tag in the format "en-US".

Returns

‌The Format function returns a date, numeric, or string depending on the formatting pattern.

Example

Let's look at some Format function examples and explore how to use the Format function.‌

Format(0.33333333, "F")
Result: 0.33

Format(0.33333333, "F4");
Result: 0.3333

// Flow 6.14.3
Format(1000, "C", "en-US");
Result: $1.000

Last updated