Month Year in mysql
hi...in sql
from following query:
select Convert(datename(mm,getdate()),varchar)+'-'+convert?(year(getdate()),varchar) MONTHYEAR..
vl get, November 2009
but in Mysql ??? pls help me....
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Kirtan PatelRank #292 · 8.6K reputationPosted Nov 28, 2009, 7:39 PM EST
The Query i suggested you returns exactly what you want it will print Monthname not Month No
select DATE_FORMAT(CURDATE(),'%M-%Y');
see the output in below image and check "do you like this answer" check box please :)
Kirtan PatelRank #292 · 8.6K reputationPosted Nov 28, 2009, 6:45 PM EST
Here is How you can do this
select DATE_FORMAT(CURDATE(),'%M %Y') from testtable;
check "Do you like this answer check box please :)
Sreekanth199 reputationPosted Nov 28, 2009, 6:54 PM EST