About 27,200 results
Open links in new tab
  1. Format SQL in SQL Server Management Studio - Stack Overflow

    Feb 13, 2020 · In Visual Studio & other IDEs, you can easily auto format your code with a keyboard shortcut, through the menu, or automatically as you type. I was wondering if there is …

  2. t sql - How to format datetime in SQL SERVER - Stack Overflow

    Jun 6, 2025 · Reopened as SQL Server 2012 has format function not in 2008.

  3. sql server - How do I format a number with commas in T-SQL?

    Dec 7, 2010 · 59 For SQL Server 2012+ implementations, you will have the ability to use the FORMAT to apply string formatting to non-string data types. In the original question, the user …

  4. Format number as percent in MS SQL Server - Stack Overflow

    May 7, 2015 · I am trying to simply format a number as a percent with two decimal places. If it is 37 divided by 38 (aka .973684210526315789), I would like it to show 97.36 % in the SQL …

  5. Convert Date format into DD/MMM/YYYY format in SQL Server

    Jun 25, 2013 · I have a query in SQL, I have to get a date in a format of dd/mm/yy Example: 25/jun/2013. How can I convert it for SQL server?

  6. sql server - How to get a date in YYYY-MM-DD format from a …

    Feb 22, 2017 · How do I retrieve a date from SQL Server in YYYY-MM-DD format? I need this to work with SQL Server 2000 and up. Is there a simple way to perform this in SQL Server or …

  7. How to convert a datetime to string in T-SQL - Stack Overflow

    Feb 22, 2013 · 19 In addition to the CAST and CONVERT functions in the previous answers, if you are using SQL Server 2012 and above you use the FORMAT function to convert a …

  8. Custom Date/Time formatting in SQL Server - Stack Overflow

    Please refer to "SQL Server", not "SQL", because different databases have different way to format dates.

  9. sql server - How to custom format a number in T-SQL - Stack …

    Jun 20, 2024 · The FORMAT function uses .NET to format the string. In .NET you can use a custom culture with a specified NumberGroupSizes of [2], but in SQL Server you can only …

  10. sql server - How to format a numeric column as phone number in …

    Sep 15, 2009 · I have table in the database with a phone number column. The numbers look like this: 123456789 I want to format that to look like this: 123-456-789