SQL Server - FORMAT() function in T-SQL

Опубликовано: 16 Октябрь 2024
на канале: Mukesh Singh
430
4

Here, you will learn about FORMAT() function in T-SQL.
The FORMAT() function is reponsible to format a value with the specified format such as format date/time values and number values.
Syntax - FORMAT(value, format, culture)
Parameter Description
value Required. The value to be formatted
format Required. The format pattern
culture Optional. Specifies a culture (from SQL Server 2017)

examples -
Country Specific Date Conversation,
Mobile Number Conversation,
Format number with commas,
Format Number to Percentage