I have a query in SQL, I have to get a date in a format of dd/mm/yy
SQL
dd/mm/yy
Example: 25/jun/2013.
25/jun/2013
How can I convert it for SQL server?
convert
SQL server
I'm not sure there is an exact match for the format you want. But you can get close with convert() and style 106. Then, replace the spaces:
convert()
106
SELECT replace(convert(NVARCHAR, getdate(), 106), ' ', '/')
1.4m articles
1.4m replys
5 comments
57.0k users