Created
March 15, 2014 15:40
-
-
Save dalmat36/9569173 to your computer and use it in GitHub Desktop.
SQL Server 2012 Format Function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*FORMAT Function | |
formats a number as a 10-digit string with leading zeros*/ | |
SELECT FORMAT(1759, 'd10') AS Cust_string; | |
/*formats a currency to various locale-aware strings*/ | |
SELECT FORMAT(5,'C','en-us') AS US_Value; --US | |
SELECT FORMAT(5,'C','de-de') AS DE_Value; --Germany |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment