See if u can help

Thread: See if u can help

1. Junior Member
Join Date
Dec 1969
Posts
2

See if u can help

Hi!<BR><BR>I`m back with a new trouble. I have to calculate the the munber of days between two dated. ok i know i can do it with the function DateDiff() but the real problem is that i have to take into account the following things:<BR>1. the user is entering two dates.....not picking it from a calender.<BR>2. I have to take into account the fact that 2nd and 4th saturday along with sundays should not be counted in the function. For example if i am asking for a leave from 29 March to 2 April then 30 and 31 march should not be included in the number of days of leave.<BR>The total number of leaves in this case should be 3 and not 5. Ya but if 30 happens to be the 1,3,5 saturday then the number of leaves should be 4.<BR>3. I have to do all this processing without letting the user know....that the user does`nt have to take care of all these things....there should be a calender in my script which will do the entire processing.<BR><BR>Thank a ton

2. Senior Member
Join Date
Dec 1969
Posts
1,424

Let's see

Take a look at this sample...<BR><BR> http://www.flws.com.au/AddWorkingDaysResurrected.asp<BR><BR>You could easily use it do do your work and simply place all *your* rules about what constitutes a valid date in the IsWorkingDay() function.<BR><BR>Then, just return the value of the dayCount variable from the AddWorkingDays function, instead of the value of the endDate variable.

3. Junior Member
Join Date
Dec 1969
Posts
2

RE: Let's see

hey thank for the code...it was of help.....can suggest how to calculate the number of weeks of any month or maybe the first day of any month...i know it all must be sounding stupid...but still just think..thank a ton.

Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•