Re: PL/SQL Function about dates

From: (wrong string) ørgensen <kjorg_at_msn.com>
Date: 1997/12/10
Message-ID: <efKicnaB9GA.315_at_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;

  • X now contains the value 14 ! end;

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 CET

Original text of this message