Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
FORMAT FUNCTION (New Feature of 2012 sql server)
SELECT FORMAT(GETDATE(), 'yyyy-MM-dd') AS [ISO Formatted Date], FORMAT(GETDATE(), 'yyyy-MM-dd hh:mm:ss') AS [Full ISO], FORMAT(GETDATE(), 'MMMM dd, yyyy') AS [Long-EN Date], FORMAT(22.7, 'C', 'en-US') AS [US Currency], FORMAT(22.7, 'C', 'ta-IN') AS [INDIA Currency], FORMAT(99 * 2.226, '000.000') AS [Padded Decimal], FORMAT(12345678, '0,0') AS [Commas in Large Numbers]
run
|
edit
|
history
|
help
0
20181cse0012dbmsca2
Create Date Batches from Date Range - SQL Server
Count by days
top 3 salaries from each dept
repert
tableA
StackOverflow_53799678
Uzd
Solution 4
extract part of a string