Re: Working Days - Corrected

This WebDNA talk-list message is from

2004


It keeps the original formatting.
numero = 58484
interpreted = N
texte = Good point but not required in my case. Thanks ======================================== Steve Craig - Asylum Interactive Ltd Tel +44 1224 642960 Fax +44 1224 642962 ======================================== http://www.asylumweb.com Email: steve@asylumweb.com ======================================== > From: Bob Minor > Reply-To: "WebDNA Talk" > Date: Fri, 18 Jun 2004 09:36:43 -0400 > To: "WebDNA Talk" > Subject: Re: Working Days - Corrected > > what about holidays? > > On Jun 18, 2004, at 9:31 AM, Mark Derrick wrote: > >> It still needed a little fine tuning :-) >> >> [text show=f]start-date=01/02/2004[/text] >> [text show=f]end-date=24/02/2004[/text] >> >> [math show=f]Total_days={[end-date]}-{[start-date]}+1[/math] >> [math show=f]working-days=0[/math] >> >> [loop start=0&end=[math][Total_days][/math]] >> [text show=f]day=[format days_to_date >> %a][math]{[start-date]}+[index][/math][/format][/text] >> [If (("[day]"="Sat") | ("[day]"="Sun"))] >> [else][text >> show=f]working-days=[math][working-days]+1[/math][/text][/else] >> [/if] >> >> [/loop] >> >> Total Days: [Total_days] >> >> Working days: [working-days] >> >> This *should* work OK. >> >> Mark. >> >> >> On 18 Jun 2004, at 2:02 pm, Mark Derrick wrote: >> >>> This is a little rough, but it should do exactly what you need. >>> (You'll need to use variable for the "Start" and "Stop" dates) >>> >>> [math show=f]Total_days={24/02/2004}-{01/02/2004}[/math] >>> [math show=f]working-days=0[/math] >>> >>> [loop start=0&end=[Total_days]] >>> [text show=f]day=[format days_to_date >>> %a][math]{01/12/2003}+[index][/math][/format][/text] >>> [If (("[day]"="Sat") | ("[day]"="Sun"))] >>> [then][/then] >>> [else][text >>> show=f]working-days=[math][working-days]+1[/math][/text][/else] >>> [/if] >>> [/loop] >>> >>> Working days: [working-days] >>> >>> >>> >>> >>> Mark. >>> >>> >>> >>> On 18 Jun 2004, at 12:01 pm, Steve Craig wrote: >>> >>>> Hi >>>> >>>> I have been asked to do something which will involve me counting the >>>> number >>>> of working days in a given period e.g. >>>> >>>>> From Feb 1st up to, and including Feb 24th there are 17 working >>>>> days. >>>> Working days being Mon-Fri, which unfortunately are not mine at the >>>> moment!!! >>>> >>>> Anyone have any pointers on how I might go about doing this? >>>> >>>> Thanks in advance >>>> >>>> ======================================== >>>> Steve Craig - Asylum Interactive Ltd >>>> Tel +44 1224 642960 Fax +44 1224 642962 >>>> ======================================== >>>> http://www.asylumweb.com >>>> Email: steve@asylumweb.com >>>> ======================================== >>>> >>>> >>>> >>>> >>>> ------------------------------------------------------------- >>>> This message is sent to you because you are subscribed to >>>> the mailing list . >>>> To unsubscribe, E-mail to: >>>> To switch to the DIGEST mode, E-mail to >>>> >>>> Web Archive of this list is at: http://webdna.smithmicro.com/ >>> >>> >>> ------------------------------------------------------------- >>> This message is sent to you because you are subscribed to >>> the mailing list . >>> To unsubscribe, E-mail to: >>> To switch to the DIGEST mode, E-mail to >>> >>> Web Archive of this list is at: http://webdna.smithmicro.com/ >> >> >> ------------------------------------------------------------- >> This message is sent to you because you are subscribed to >> the mailing list . >> To unsubscribe, E-mail to: >> To switch to the DIGEST mode, E-mail to >> >> Web Archive of this list is at: http://webdna.smithmicro.com/ > > > ------------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to > > Web Archive of this list is at: http://webdna.smithmicro.com/ > ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Working Days - Corrected ( Steve Craig 2004)
  2. Re: Working Days - Corrected ( Bob Minor 2004)
  3. Re: Working Days - Corrected ( Mark Derrick 2004)
Good point but not required in my case. Thanks ======================================== Steve Craig - Asylum Interactive Ltd Tel +44 1224 642960 Fax +44 1224 642962 ======================================== http://www.asylumweb.com Email: steve@asylumweb.com ======================================== > From: Bob Minor > Reply-To: "WebDNA Talk" > Date: Fri, 18 Jun 2004 09:36:43 -0400 > To: "WebDNA Talk" > Subject: Re: Working Days - Corrected > > what about holidays? > > On Jun 18, 2004, at 9:31 AM, Mark Derrick wrote: > >> It still needed a little fine tuning :-) >> >> [text show=f]start-date=01/02/2004[/text] >> [text show=f]end-date=24/02/2004[/text] >> >> [math show=f]Total_days={[end-date]}-{[start-date]}+1[/math] >> [math show=f]working-days=0[/math] >> >> [loop start=0&end=[math][Total_days][/math]] >> [text show=f]day=[format days_to_date >> %a][math]{[start-date]}+[index][/math][/format][/text] >> [If (("[day]"="Sat") | ("[day]"="Sun"))] >> [else][text >> show=f]working-days=[math][working-days]+1[/math][/text][/else] >> [/if] >> >> [/loop] >> >> Total Days: [Total_days] >> >> Working days: [working-days] >> >> This *should* work OK. >> >> Mark. >> >> >> On 18 Jun 2004, at 2:02 pm, Mark Derrick wrote: >> >>> This is a little rough, but it should do exactly what you need. >>> (You'll need to use variable for the "Start" and "Stop" dates) >>> >>> [math show=f]Total_days={24/02/2004}-{01/02/2004}[/math] >>> [math show=f]working-days=0[/math] >>> >>> [loop start=0&end=[Total_days]] >>> [text show=f]day=[format days_to_date >>> %a][math]{01/12/2003}+[index][/math][/format][/text] >>> [If (("[day]"="Sat") | ("[day]"="Sun"))] >>> [then][/then] >>> [else][text >>> show=f]working-days=[math][working-days]+1[/math][/text][/else] >>> [/if] >>> [/loop] >>> >>> Working days: [working-days] >>> >>> >>> >>> >>> Mark. >>> >>> >>> >>> On 18 Jun 2004, at 12:01 pm, Steve Craig wrote: >>> >>>> Hi >>>> >>>> I have been asked to do something which will involve me counting the >>>> number >>>> of working days in a given period e.g. >>>> >>>>> From Feb 1st up to, and including Feb 24th there are 17 working >>>>> days. >>>> Working days being Mon-Fri, which unfortunately are not mine at the >>>> moment!!! >>>> >>>> Anyone have any pointers on how I might go about doing this? >>>> >>>> Thanks in advance >>>> >>>> ======================================== >>>> Steve Craig - Asylum Interactive Ltd >>>> Tel +44 1224 642960 Fax +44 1224 642962 >>>> ======================================== >>>> http://www.asylumweb.com >>>> Email: steve@asylumweb.com >>>> ======================================== >>>> >>>> >>>> >>>> >>>> ------------------------------------------------------------- >>>> This message is sent to you because you are subscribed to >>>> the mailing list . >>>> To unsubscribe, E-mail to: >>>> To switch to the DIGEST mode, E-mail to >>>> >>>> Web Archive of this list is at: http://webdna.smithmicro.com/ >>> >>> >>> ------------------------------------------------------------- >>> This message is sent to you because you are subscribed to >>> the mailing list . >>> To unsubscribe, E-mail to: >>> To switch to the DIGEST mode, E-mail to >>> >>> Web Archive of this list is at: http://webdna.smithmicro.com/ >> >> >> ------------------------------------------------------------- >> This message is sent to you because you are subscribed to >> the mailing list . >> To unsubscribe, E-mail to: >> To switch to the DIGEST mode, E-mail to >> >> Web Archive of this list is at: http://webdna.smithmicro.com/ > > > ------------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to > > Web Archive of this list is at: http://webdna.smithmicro.com/ > ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Steve Craig

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

WebCatalog dying in NT (1998) Webcat not processed for CACHEd image error pages (1998) Authorize.net setup (2002) Pithy questions on webcommerce & siteedit (1997) [WebDNA] WebDNA Roll Call (2013) os 8.5 (1999) SOP for WebDNA talk - MSNBot Crashing (2004) Determining Method (2000) turning every 5th line red (1999) I have observed and I am gone. (1998) Banner Ad Server Solutions Using WEbDNA (2000) Just a thought (1998) View order not right (1997) Extract my page name (2006) Integration with SQL (1997) creating writefile data from a nested search (1997) Suffix Mapping (1997) Quiz question: Return all green and blank records? (2001) PSC recommends what date format yr 2000??? (1997) [thisurl] file name? (1999)