ICultureInfo.FormatVariant

Syntax

FormatVariant(Value: Variant): String;

Parameters

Value. Value converted into string type.

Description

The FormatVariant method converts the specified value into string type according to regional standard settings.

Comments

Depending on the type of passed value, the method processing will be the same as one of the Format* methods in ICultureInfo. On determining the date value (with time component or without) in the Value parameter, the result will be the same as of the FormatDateTime method.

Example

Function GetInvariantVariant(Value: Variant): String;
Var
    CI: ICultureInfo;
Begin
    CI := CultureInfo.Invariant;
    Return CI.FormatVariant(Value);
End Function GetInvariantVariant;

The specified function can be used to convert any passed values into string type according to invariant culture settings.

See also:

ICultureInfo