Pregunta

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?

¿Fue útil?

Solución

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

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top