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: PL/SQL Function about dates

Re: PL/SQL Function about dates

From: Karl E. Jørgensen <kjorg_at_msn.com>
Date: 1997/12/10
Message-ID: <efKicnaB9GA.315@upnetnews02.moswest.msn.net>#1/1

The Oracle Date datatype supports additions and subtractions, making this valid:

declare

    date_var1 date;
    date_var2 date;
    x integer;
begin

    date_var1 := to_date('01/01/1998','DD/MM/YYYY');     date_var2 := to_date('15/01/1998','DD/MM/YYYY');

    x := date_var2 - date_var_1;

So, you do NOT need any specialised functions.

Hope this helps

Karl

Acácio Nuno wrote in message <3483EFF8.549E6F0C_at_ifb.pt>...
>Hi PL/SQL programers,
>
>I need to kown the number of days between two dates, if you have a
>function that accepts these
>2 dates as parameters and returns the number of days between them,
>pleaaaaaase send me!
>
>THANKS!!!!! :)
>
Received on Wed Dec 10 1997 - 00:00:00 CST

Original text of this message

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