MySQL Forums
Forum List  »  General

Re: How returns Last Month?
Posted by: Alexandre Salomé
Date: April 04, 2020 12:36PM

Hi Peter, thanks a lot for help.

is like this ?


SELECT * FROM BancoDados.Tabela

WHERE fixtime between date_format(curdate() - interval 1 month,'%y-%m-01')
and last_day(curdate() - interval 1 month)



(catch all days os previous month)

Best regards

Alex

Options: ReplyQuote


Subject
Written By
Posted
Re: How returns Last Month?
April 04, 2020 12:36PM


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.