SQL FORMAT() is an inbuilt function that is used for formatting a value with the specified format. The FORMAT() function is used with date/time values and number values. SQL FORMAT() function formats the value with the specified format (and an optional culture in SQL Server 2017). Use the FORMAT() function to format date/time values and number values.

SQL Format Function

SQL Format 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. For general data type conversions, use CAST or CONVERT.

Syntax

SELECT FORMAT (value, format, culture);

#sql #sql server #sql format

SQL Format Function | How To Format Function In SQL Server
1.60 GEEK