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

Home -> Community -> Usenet -> c.d.o.server -> Re: integer division

Re: integer division

From: Connor McDonald <mcdonald.connor.cs_at_bhp.com.au>
Date: 1997/07/01
Message-ID: <33B8D9ED.680@bhp.com.au>#1/1

Daren Lee wrote:
>
> hi
>
> does anyone know how to force integer division?
>
> i'm subtracting 2 DATE types to get the number of
> days between them and then i need to divide by 7.
>
> e.g:
>
> to_char(date1,'j')-to_char(date2,'j')/7
>
> thanks

look at

   trunc
   round
   floor
functions in oracle

eg trunc(13/5) = 2

etc

Cheers
Connor

-- 
Connor McDonald
Systems Administrator-Unix/Oracle
BHP Information Technology
("These views are mine not BHPIT blah blah")
"You're not drunk if you can lie on the floor without holding on"
            - Dean Martin
Received on Tue Jul 01 1997 - 00:00:00 CDT

Original text of this message

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