MONTH(CMS.App_Received_Date) as 'App Month'
will return 4
for April when date is like 2012-04-01
will return 5
for May when date is like 2012-05-02
etc
Is there a TSQL function to return April, May, June instead?
i.e. MONTHNAME(CMS.App_Received_Date) as 'App Month'
DATENAME(month, CMS.App_Received_Date) as 'App Month'
SELECT DATENAME(month, '2012-04-01') AS 'App Month'
Returns a character string that represents the specified datepart of the specified date.
Note that the return value depends on the language environment, in my case it returns Januar
(german).
http://msdn.microsoft.com/en-us/library/ms174395.aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With