Frage

I am having issues with DATE functions in SQL Plus. I am trying to calculate the difference in days between two dates with the following query:

SELECT  Item,
datebought,
datesold,
DATEDIFF('2008-06-05','2008-08-05') AS Days
FROM    auctions;

but I always receive the following error: ORA-00904: "DATEDIFF": invalid identifier. What am I doing wrong?

War es hilfreich?

Lösung

So apparently DATE functions do not exist within oracle. Thus, the best option is probably to simply subtract the two dates directly.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top