Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: ___DATE, DATE, DATE Subtraction
please refrain from cross posting to all oracle groups.
subtracting one date expression from another date expression returns the number days between the date expressions, as a NUMBER, not DATE.
HTH
"Chris Chi" <stvllium_at_ms18.hinet.net> wrote in message
news:9he8ve$skq_at_netnews.hinet.net...
> Hi
>
> How can I subtract DATE variable by another DATE variable, as below :
>
> declare
> StartDate DATE;
> EndDate DATE;
> ResultDate DATE;
> XXX CHAR(10);
> begin
> ......
> ResultDate := EndDate - StartDate; -- Subtraction
> ......
> XXX := TO_CHAR(ResultDate, '...');
> end;
>
> Thanks
>
> Chris from Taiwan, R.O.C.
>
>
>
>
>
>
>
Received on Sat Jul 21 2001 - 16:17:22 CDT
![]() |
![]() |