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....
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Kirtan PatelPosted Nov 29, 2009, 12:39 AM
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 :)
SreekanthPosted Nov 28, 2009, 11:54 PM
Kirtan PatelPosted Nov 28, 2009, 11:45 PM
Here is How you can do this
select DATE_FORMAT(CURDATE(),'%M %Y') from testtable;
check "Do you like this answer check box please :)