Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Date difference problem in PL/SQL
Paul Tomlinson wrote:
> Hello,
>
> Does anyone have a routine which will return the (total) difference in
> minutes between two dates?
>
> It doesn't look like Oracle provides any fancy date manipulation
> functions....
>
> PT
>
>
SQL> select to_char(sysdate,'YYYYMMDD-HH24:MI:SS') from dual;
TO_CHAR(SYSDATE,'YYYYMMDD-HH24:MI:SS')
SQL> select sysdate - to_date('20031111-22:57:20','YYYYMMDD-HH24:MI:SS')
2 from dual;
SYSDATE-TO_DATE('20031111-22:57:20','YYYYMMDD-HH24:MI:SS')
.000625
Looks like Oracle doesn't need them...
If you want minutes, do the math -the answer is in days
-- Regards, Frank van BortelReceived on Tue Nov 11 2003 - 16:12:17 CST