I need to use Oracle but DATEDIFF function doesn\'t work in Oracle DB.
How to write the following code in Oracle? I saw some examples using INTERVAL or TRUNC.
Just subtract the two dates:
select date '2000-01-02' - date '2000-01-01' as dateDiff from dual;
The result will be the difference in days.
More details are in the manual: https://docs.oracle.com/cd/E11882_01/server.112/e41084/sql_elements001.htm#i48042