Formatting FLOAT values as Percentages + SQL Server 2012

Posted by Bandi under Sql Server category on | Points: 40 | Views : 187
FORMART() function is introduced in SQL Server 2012. Also used for formatting/converting numeric values to percetages.... It simplifies some calculation part and also the representing value with % symbol.

DECLARE @percent FLOAT = 0.84 --Values will be multiplied by 100
SELECT FORMAT(@percent,'P') AS 'Percentage'

84.00 %

Comments or Responses

Login to post response