See Also: MONTH, DAYOFWEEK
Example:
/* might return something like 29-2015-12 */ SELECT FORMAT (GETDATE(), ‘dd-yyyy-mm’) /* returns 5,459,40 */ SELECT FORMAT (5459.4, '##,##0.00') /* Returns name of month in full e.g. 'October' */ SELECT DISTINCT thedate,FORMAT(thedate,'MMMMM') AS MonthName FROM transact TheDate Month 10/1/2000 October 10/2/2000 October 10/3/2000 October 10/4/2000 October /* Returns name of month in abbreviated e.g. Oct */ SELECT DISTINCT thedate,FORMAT(thedate,'MMM') AS MonthName FROM transact TheDate Month 10/1/2000 Oct 10/2/2000 Oct 10/3/2000 Oct 10/4/2000 Oct