MySQL Forums
Forum List  »  Newbie

Re: DATE DIFF
Posted by: Rick James
Date: December 06, 2014 02:49PM

> Is there a select statement you can use which says return column x if the date in column y less the date in(?) column x is greater than 3 days??

Do you mean that "x is more than 3 days older than y"? If so...

Try a format like this:
SELECT x FROM tbl WHERE x < y - INTERVAL 3 DAY;

Options: ReplyQuote


Subject
Written By
Posted
December 06, 2014 01:40PM
December 06, 2014 02:12PM
Re: DATE DIFF
December 06, 2014 02:49PM
December 06, 2014 03:09PM


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.