2
Good evening, I believe my doubt is easy for some, but I am beginner is breaking my head, I need to do a search with select between the two dates, searching only the month and the year... I did with the month and it worked, now only the year is missing. If you can help me I appreciate.
SELECT * FROM pagamento WHERE Month(data) between '06' AND '07';
It brings the right results between the months, now I need you to look for the year. From now on I thank anyone who can help me.
SELECT * FROM payment WHERE year(date) between '2014' AND '2018';
– user60252
@Leocaracciolo with this will be returned the specified months and years and not "between dates".
– tvdias
It brings the right results between the months, now I need you to look for the year
– user60252
And how are the dates in the bank? DATETIME, DATE ??
– user60252