FORMAT

Returns a value formatted with the specified format and optional culture. Use the FORMAT function for locale-aware formatting of date/time and number values as strings.

Syntax

FORMAT ( value, format [, culture ] )

Arguments

value

Expression of a supported data type to format.

format

nvarchar format pattern.

Return types

nvarchar or null

The length of the return value is determined by the format.

Examples

SELECT FORMAT(8.2784, 'C', 'pl-PL');

See Also