Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

difference between two date in minutes (number)

663506Oct 23 2008 — edited Oct 23 2008
Hi,
I would like to get the difference between 2 dates in minutes of type number.

e.g. in SQL server database
select datediff(minute, testDate, getDate()) from test_table

in Oracle, I tried
select round((sysdate - testDate) * 24 * 60) from test_table

I got error:
ORA-00932: inconsistent datatypes: expected NUMBER got INTERVAL DAY TO SECOND

Can u please help?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 20 2008
Added on Oct 23 2008
6 comments
9,608 views