I have a table with expiration CB cards dates in format MMYY (example: 0322). I want to query cards which will expire in the next month.
I know about DATE_FORMAT, but when I try this query:
SELECT * FROM payment_way WHERE expiration_date <= DATE_FORMAT(NOW(), "%m%y")
I have cards with expiration_date like: 0523
How can I select expiration dates for the next month? I thought I had a good way with DATE_FORMAT.