469,071 Members | 1,904 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,071 developers. It's quick & easy.

Compare Two Dates on 30 days greater than the other

Trying to write a sql statement to return a result set comparing two dates where the 1st date is 31 days or greater than the 2nd date
Jul 31 '15 #1
1 2129
1,043 Expert 1GB
Maybe this will help:
Expand|Select|Wrap|Line Numbers
  2.    DATE('2015-08-01'),
  3.    ADDDATE(DATE('2015-08-01'), INTERVAL -1 DAY),
  4.    DATEDIFF('2015-08-01','2015-01-01');
This should return 3 column with the values:
2015-08-01; 2015-07-31; 212

(my date-format is 'YYYY-MM-DD')
Aug 1 '15 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

4 posts views Thread by alexis | last post: by
9 posts views Thread by Rich | last post: by
1 post views Thread by Manny Chohan | last post: by
2 posts views Thread by ghjk | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.