Re: Calculate working days using stored procedure
Posted in 1998
I have a fairly sophisticated routine to do working day addition... at home. I'll try to remember to send it to you from there. It implies creating a 'holidays' table with the date of each 'non-working' date that is not a weekend in it. Essentially the routine figures out the distance from a standard point (monday for example) of the first date, does addition of # of working days, adds 2 days for each week, then checks the holiday table to ensure that it didn't hit any holdiays - and if it did, adds those in. Works correctly in all tests I ran it through and in production for several years. cheers j. sjsyau@my-dejanews.com on 06/24/98 06:36:22 PM Please respond to sjsyau@my-dejanews.com To: informix-list@iiug.org cc: (bcc: Jack Parker/Boston50/Epsilon) Subject: Calculate working days using stored procedure Please help me here. Given: Today's date + Working Days Today's date - Working Days I need to find out the result in date format. The working days means to exclude weekends and holidays. Ex, 06-27-1998 + 10 should = 07-10-1998 Any hints? SJ sjsyau@yahoo.com -----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/ Now offering spam-free web-based newsreading