|
-
May 8th, 2008, 10:52 PM
#1
Thread Starter
PowerPoster
Get number of weekdays between two dates.
Hey guys, I was wondering if anyone had written a function that will return the number of work days between two dates. I figured this has been done many times, but I can't figure out how to go about it.
For instance if I put in the dates 2008-04-19 and 2008-05-02 it would return the number of days between those two dates minus weekends. Well not just between, it would also include those two days.
I was thinking of looping thru the dates somehow and using the date function to check if that date is a Sat or Sun using the Date("l") function, but I am not sure how to loop thru dates because you also have to know how many days are in the month and then start in the new month if the dates cross between two months...etc.
Anyone have any input? Thanks.
-We have enough youth. How about a fountain of "Smart"?
-If you can read this, thank a teacher....and since it's in English, thank a soldier.

Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|