Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: this cannot be then best way
g wrote:
> I have a date mydate and i want to subtract X working days off
>
> i was thinking of something like
>
> loop while x > 0
> if to_char(mydate,'d') < 6 then
> x = x -1
> endif
> mydate :mydate - 1
> endloop
>
> any ideas
If X tends to be large (>2weeks),
then save a few passes thru the loop by
HTH,
ed
Received on Fri Jul 14 2006 - 13:33:47 CDT