I used something like the following to work out the number of working
days
between 2 dates. You should be able to manipulate to get what you
want:
<cfloop condition="#daysadded# LT #stagelength#">
<cfset nextdate = DateAdd("D",1,nextdate)>
<cfif DayOfWeek(nextdate) IS NOT 1 AND DayofWeek(nextdate) IS NOT 7>
<cfset daysadded = daysadded + 1>
</cfif>
</cfloop>
-----Original Message-----
From: Chris Combs [mailto:[EMAIL PROTECTED]]
Sent: 24 January 2002 17:03
To: CF-Talk
Subject: RE: Calculating workdays
What DBMS are you working with?
-----Original Message-----
From: Alex [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 24, 2002 11:50 AM
To: CF-Talk
Subject: Re: Calculating workdays
i have been looking for something like this forever and have not found
it.
Or even a way to do it without making clunking code.
On Thu, 24 Jan 2002, it-werks wrote:
> I could have sworn there was a tag on the developer's exchange, but I
sur
e
> can't find it.
>
> I am looking for a tag, formula or whatever is needed to do the
following
:
> When a number is entered into a form field named "leadtime" and a
date is
> put in a form field named "need_by" a results field will be the
calculate
d
> date that
> is the number of WEEKDAYS(mon-fri) BEFORE the Needed Date.
> In other words: I need the date to order a part which has a leadtime
of x
> number of workdays before the needby date.
>
> Sure could use some help here.
>
> Terry Troxel
>
>
______________________________________________________________________
Why Share?
Dedicated Win 2000 Server � PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
Instant Activation � $99/Month � Free Setup
http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists