I have a table that contains two dates, "vis_dt1" and "vis_dt2." I want to find all "vis_dt2 dates" that fall outside a certain window, e.g. 144 - 260 days after "vis_dt1", but including "vis_dt1". I know Oracle gives me the days between, but how do I adjust for the first day? Is there a general rule for date arithmetic like this?
I think in your "where clause" specifying the following condition to address your requirement:
By submitting your email address, you agree to receive emails regarding relevant topic offers from TechTarget and its partners. You can withdraw your consent at any time. Contact TechTarget at 275 Grove Street, Newton, MA.
TRUNC(vis_dt2) NOT BETWEEN trunc(visdt1+144) and trunc(visdt1+260)
AND trunc(vis_dt2) >= trunc(vis_dt1)