Calculated days added to SYSDATE [WAS: (no subject)]

Edis, Robert REdis@Blistex.com
Tue, 30 Sep 2003 12:58:08 -0500


Darren

I believe Jesus needs to calculate the number of working days between two dates not the total days.  If you assume 5 working days a week this is not too difficult but if you want to exclude holidays then I don't think it can be done without a lookup table.

Regards,
Blue

-----Original Message-----
From: powerh-l-admin@cube.swau.edu
[mailto:powerh-l-admin@cube.swau.edu]On Behalf Of Darren Reely
Sent: Tuesday, September 30, 2003 11:45 AM
To: Valentin Martínez
Cc: powerh-l@lists.swau.edu
Subject: Re: Calculated days added to SYSDATE [WAS: (no subject)]


If I've interpreted your broken english correctly, here is a Quiz 
example I think will help you. The days function counts from 19000101. 
Run the sample to see what you get.

define begin-date-range date = 20030929
define todays-date date = sysdate
define before-range num = days(todays-date) - days(begin-date-range)
define newdate date = date(days(todays-date) + before-range)
report all

The short version is:
define begin-date-range date = 20030929
define newdate date = date( days(sysdate) + (days(sysdate) - 
days(begin-date-range)) )

Darren


Valentin Martínez wrote:

> Hello to all. greetings. 
> Waiting that you have or have had an excellent day. 
>  
> Could they tell me I eat up to obtain the I number of working days 
> inside a range of dates so that this result to add it to the current 
> date?  
>  
> Environment - UNIX - Powerhouse 8.23.D4   -   Oracle-815. 
>  
> thank you in advance
>  
> -------------------------------------------------------------------------
> Jesús Valentín Martínez de Haro
> Analista de sistema
> vmtnez@emyco.com <mailto:vmtnez@emyco.com> 
>