To modify the format of a date in a SELECT query, I'm using the CONVERT(data type(length),expression,style) function.
Declare @dt nvarchar(20)
Select @dt = Convert(nvarchar(20), SalesDate, 113) FROM SalesTable
The format I require is "dd-MMM-yyyy" (for example, "05-Jul-2013"), however, I was unable to locate the appropriate style number (for example, 113) for this specific format. Please, if somebody could assist me with that?