Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: integer division
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 MartinReceived on Tue Jul 01 1997 - 00:00:00 CDT