MySQL Forums
Forum List  »  General

Re: How returns Last Month?
Posted by: Peter Brawley
Date: April 04, 2020 11:28AM

select 
  date_format(curdate() - interval 1 month,'%y-%m-01') as firstday,
  last_day(curdate() - interval 1 month) as lastday;

Options: ReplyQuote


Subject
Written By
Posted
Re: How returns Last Month?
April 04, 2020 11:28AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.