Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Date difference problem in PL/SQL

Re: Date difference problem in PL/SQL

From: Frank <fbortel_at_home.nl>
Date: Tue, 11 Nov 2003 23:12:17 +0100
Message-ID: <bormcv$fkb$1@news4.tilbu1.nb.home.nl>


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')



20031111-22:57:20

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 Bortel
Received on Tue Nov 11 2003 - 16:12:17 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US