All Forums Database
samit_9999 37 posts Joined 03/06
10 Mar 2008
Date Difference

Hi,I want to find difference between 2 date fields and only select it if the difference is greater than 3 yearsExampleDt1 = 01/01/2003Dt2 = 01/01/2007Difference is greater than 3 yearsDt1 = 02/01/2004Dt2 = 01/01/2007Difference is less than 3 years don't count itThanks much in advance.

joedsilva 505 posts Joined 07/05
10 Mar 2008

WHERE ADD_MONTHS(DT1, 36) < DT2;

You must sign in to leave a comment.