Without any problems, you can use CONVERT to get the format "dd MONTHNAME yyyy":
SELECT CONVERT(VARCHAR, GETDATE(), 106)
eg. January 25, 2010
If you need your exact format, you may need to do a bit of manual tinkering, for example:
SELECT CAST(DAY(GETDATE()) AS VARCHAR) + '-' + LEFT(DATENAME(mm, GETDATE()), 3) + '-' + RIGHT(CAST(YEAR(GETDATE()) AS VARCHAR), 2)
eg. "25-Jan-10"
Update:
In fact, a shorter way to achieve this:
SELECT REPLACE(CONVERT(VARCHAR, GETDATE(), 6), ' ', '-')
eg. "25-Jan-10"
source
share