This function formats one or more values according to the given formatting string using .NET standard format strings.
TextFormat([Format String], [Values])
Where:
Format String is the string to format that contains placeholders {0}, {1}, etc. with formats to use (for example: "C:\Program Files\{0:0.#}\Hello\World\{1:yyyy-MM-dd hh:mm:ss}").
For more information see Microsoft Learn.
Values is the value or collection of values, separated with a comma (,) to be formatted. The first value will be passed into the {0} placeholder, the second value will be passed into the {1} placeholder, etc.
Regional Culture
This function uses the regional culture of the device running a specification to format the output.
For example the rule:
TextFormat("{0:D}", Now())
Will return 11 February 2026 for some regional cultures.
And February 11 2026 for other regional cultures.
To format text using the invariant culture see TextFormatInvariant.
Rule | Meaning |
|---|---|
| TextFormat("C:\Program Files\{0:0.#}\Hello\World\{1:yyyy-MM-dd hh:mm:ss}",9.7, Now()) | Will replace the format string {0:0.#} with 9.7 and the format string {1:yyyy-MM-dd hh:mm:ss} with the result of the Now() function |