Krish KvR Krish KvR - 1 year ago 133
SQL Question

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

I have a query in sql, I have to get date in a format of



How can I convert it for SQL server?

Answer Source

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:

SELECT replace(convert(NVARCHAR, getdate(), 106), ' ', '/')
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download