For example I have a table with fields:
id date
1 2001-01-01
2 2001-01-05
.................
N 2011-12-31
How get i get all months last days from this table? example:
if i have dates like 2001-05-31 and 2001-06-01 i need only 2001-05-31 not both
You can do SELECT LAST_DAY for example the below returns Oct. 31st. 2010
SELECT LAST_DAY('2010-10-10');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With