Link to home
Start Free TrialLog in
Avatar of Star79
Star79Flag for United States of America

asked on

Format the date in sql

How to get to display date as May-2014 from today's date in the sql select statement
Thanks all.
ASKER CERTIFIED SOLUTION
Avatar of Andrew Crofts
Andrew Crofts
Flag of Ukraine image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of PortletPaul
sql server 2012+

SELECT FORMAT ( getdate(), 'MMM yyyy' )

before 2102 (and for something a little different :)

SELECT right( convert(varchar,getdate(),106) ,8)

SQL Server Date Styles (formats) using CONVERT()