Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's minimum standard of quality and will not be displayed.

Replies are listed 'Best First'.
Re: date Diff
by greenFox (Vicar) on Jul 12, 2002 at 03:10 UTC
Re: date Diff
by TexasTess (Beadle) on Jul 11, 2002 at 18:48 UTC
    It will be a number, how could it be a date May 5 minus May 2nd does not equal May 3. However May 5 - May 2 will equal 172800 seconds..which you'll have to format into Days:hours:minutes and Seconds

    TexasTess
    "Great Spirits Often Encounter Violent Opposition From Mediocre Minds" --Albert Einstein
Re: date Diff
by rdfield (Priest) on Jul 12, 2002 at 06:56 UTC
    This is a Perl oriented site, not PL/SQL...the correct place for PL/SQL questions is http://metalink.oracle.com or perhaps http://docs.oracle.com. However, I can answer the question here - the value returned is a number:
    set serveroutput on declare d1 date; d2 date; n1 number; begin d1 := sysdate; d2 := sysdate - 1; n1 := d1 - d2; dbms_output.put_line(n1); end; /
    results in "1", and just to prove it's not a coerced value, if you change the type of n1 to date, it doesn't compile.

    rdfield