MySQL Forums
Forum List  »  Newbie

Re: date manipulation.
Posted by: Felix Geerinckx
Date: August 11, 2005 01:58PM

Arthur Gapusan wrote:

> how can I display all records for the past 3 months from db..

SELECT * FROM foo WHERE thedatecol >= CURRENT_DATE - INTERVAL 3 MONTH;

--
felix
Please use BBCode to format your messages in this forum.

Options: ReplyQuote


Subject
Written By
Posted
August 11, 2005 12:21PM
Re: date manipulation.
August 11, 2005 01:58PM


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.