Question : How do I get Year, Month from datetime

How do i get , example

2007-03 from time which is a datetime

Answer : How do I get Year, Month from datetime

select concat(year(YourDate), '-',Month(YourDate)) from table
Random Solutions  
 
programming4us programming4us