[Solved] adddate(curdate(), -(day(curdate())-1)) and concat(last_day(curdate()),’ 23:59:59′) [closed]
DAY(CURDATE())-1 is the current day of the month, less 1. For today (Aug 15, 2013), the value would be 14. Subtract 14 days from August 15 and you have August 1. In other words, ADDDATE(CURDATE(), -(DAY(CURDATE())-1)) gives you the first day of the month. LAST_DAY(CURDATE()) gives you the last day of the month. If you … Read more