years between two dates in sql code example
Example 1: sql get number of days between two dates
DATEDIFF(DAY, '1/1/2011', '3/1/2011')
Example 2: difference in dates sql
SELECT (END_DATE - START_DATE) Days-Total FROM MyTable
/*this works for oracle sql*/