Question: how to calculate date difference in oracle?
Answer: You can simply subtract two dates. You have to cast it first, using to_date : select to_date('2000-01-01', 'yyyy-MM-dd') - to_date('2000-01-02', 'yyyy-MM-dd') datediff from dual ; The result is in days, to the difference of these two dates is -1 (you could swap the two dates if you like).