mysql select datetime within month code example Example: mysql select month and year Click to copySELECT DATE_FORMAT(test_date,'%Y%m') AS date FROM test_table;