Home Search

DriveWorks Pro 24
TextInvariant

Send Feedback

TextInvariant

Formats the given value according to an Excel formatting string using the invariant culture.

Syntax

TextInvariant(Value,Format)

Where:

The value to convert to format.

An Excel formatting string, for example:

  • "0000.00" - Formats a number with up to four leading zeroes, and to two decimal places.
  • "#.00" - Formats a number to two decimal places.
  • "DDDDMMYY-HHMMSS" - Formats a date.

Invariant Culture

The invariant culture is culture-insensitive.

It is particularly important when specifications are run on browsers with different regional cultures.

When text is formatted invariantly the result is consistent across all cultures.

To format text using the regional culture see Text.

Examples

Example 1

TextInvariant(23.2468,"0000.00")

Will result in 0023.25

Example 2

TextInvariant(23.2468,"#.00")

Will result in 23.25

Example 3

TextInvariant(Now(),"dd-mm-yy")

Will result in 23-06-26 (when called on that date)

See Also

For more information on formatting strings please see the Microsoft article TEXT function.

Other functions that use the invariant culture

TextFormatInvariant - Formats one or more values invariantly according to the given formatting string.

TableFormatInvariant - Formats text found in a column in the provided table using the invariant culture.

Functions that use regional culture

Text - Formats the given value according to an Excel formatting string.

TextFormat - Formats one or more values according to the given formatting string using .NET framework 4 standard format strings.

TableFormat - Applies a format to all values in a specified column of a table.