What is Format function in Denali? Explain with example.

 Posted by Niladri.Biswas on 7/13/2012 | Category: Sql Server Interview questions | Views: 1298 | Points: 40
Answer:

This function is use to format the value.
The syntax is as under

Format (expression, format [, culture]) 

e.g.
Select FormattedCurrency = FORMAT(50,'c','ru') ,Dateformat = FORMAT('07/14/2012','yyyy/mm/dd','fr')


/*
FormattedCurrency Dateformat
----------------- ---------
50,00p. 2012/07/14
*/


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response