Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Calculate Weekdays in ASP

Reply
Thread Tools

Calculate Weekdays in ASP

 
 
JP SIngh
Guest
Posts: n/a
 
      07-13-2004
Hi All

I need to calculate the number of working days between the two dates entered
on an ASP page. I am not that great a coder in ASP and was wondering if
someone can help.

Basically the form has Two textboxes to enter dates

From Date - Fdate
To Date - TDate
Number of days - NoDays (This field needs to be populated by the function
once the function/sub has been executed)

The function should be able to calculate number of working days between the
two dates but MUST exclude the list of public holidays between the two days.
The list of public holidys for each year is stored in a database table.

The form I am using also has two check boxes called

Include Saturdays
Include Sundays

If any of the two checkboxes are checked it must include the relevant days
in the calculation if not then sat/sun must be excluded from the
calculation.

Thanks in advance for your help it is highly appreciated


 
Reply With Quote
 
 
 
 
Evertjan.
Guest
Posts: n/a
 
      07-13-2004
JP SIngh wrote on 13 jul 2004 in
microsoft.public.inetserver.asp.general:
> I need to calculate the number of working days between the two dates
> entered on an ASP page. I am not that great a coder in ASP and was
> wondering if someone can help.


Google is your friend, even serverside.

http://groups.google.com/groups?q=wo...+group%3A*.asp

http://groups.google.com/groups?q=ca...+group%3A*.asp

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
 
Reply With Quote
 
 
 
 
Aaron [SQL Server MVP]
Guest
Posts: n/a
 
      07-13-2004
Since VBScript has absolutely no concept of your company's holidays, you
might be better off using a calendar table.

http://www.aspfaq.com/2453
http://www.aspfaq.com/2519

--
http://www.aspfaq.com/
(Reverse address to reply.)




"JP SIngh" <> wrote in message
news:u$...
> Hi All
>
> I need to calculate the number of working days between the two dates

entered
> on an ASP page. I am not that great a coder in ASP and was wondering if
> someone can help.
>
> Basically the form has Two textboxes to enter dates
>
> From Date - Fdate
> To Date - TDate
> Number of days - NoDays (This field needs to be populated by the function
> once the function/sub has been executed)
>
> The function should be able to calculate number of working days between

the
> two dates but MUST exclude the list of public holidays between the two

days.
> The list of public holidys for each year is stored in a database table.
>
> The form I am using also has two check boxes called
>
> Include Saturdays
> Include Sundays
>
> If any of the two checkboxes are checked it must include the relevant days
> in the calculation if not then sat/sun must be excluded from the
> calculation.
>
> Thanks in advance for your help it is highly appreciated
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
weekdays in range Jive Dadson Python 4 10-18-2009 11:04 AM
calculate weekdays Mike ASP .Net 1 07-14-2008 12:57 PM
Calculate height of iframe problem in asp page with external link Robert de Ridder Javascript 1 11-07-2005 04:54 PM
Calculate the number of WEEKDAYS between 2 dates? SimonC Javascript 5 01-27-2005 02:27 PM
calculate the download and upload time .. HELP!! Marlon ASP .Net 1 09-10-2004 12:39 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57