1
Reply

What is the use of Format() in SQL? How we can use it.

Ankur Mistry

Ankur Mistry

Sep 25, 2017
327
0

    It is a function is SQL Server. It returns a value formatted with the specified format. option of culture is available in SQL Server 2017.Use the FORMAT function for locale-aware formatting of date/time and number values as strings.DECLARE @d DATETIME = '11/10/2017'; SELECT FORMAT ( @d, 'd', 'en-US' ) AS 'US English Result' ,FORMAT ( @d, 'd', 'en-gb' ) AS 'Great Britain English Result'

    Tushar Dikshit
    November 10, 2017
    0