Displaying Currency in various formarts + SQL Server 2012

Bandi
Posted by Bandi under Sql Server category on | Points: 40 | Views : 334
FORMART() function helps you to display integer/float vlaues in various currency formats....


DECLARE @var INT = 45
SELECT FORMAT(@var,'c') AS Currency; -- $45.00
SELECT FORMAT(@var,'c1') AS Currency; -- $45.0
SELECT FORMAT(@var,'c2') AS Currency; -- $45.00
SELECT FORMAT(@var,'c3') AS Currency; -- $45.000

Comments or Responses

Login to post response