Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Counting weekdays between two dates
Message
From
21/06/2004 11:01:20
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
21/06/2004 09:46:28
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00915620
Message ID:
00915649
Views:
9
>I need to count the number of weekdays between two dates. What is the best method?
>
>For example, how many days are there between 01/01/2004 and 04/03/2004 excluding all weekends? Is there a VFP function to assist in this?
>
>Thanks in advance!
>
>Greg

For speed, how about getting an integer number of weeks, and multiply by 5/7. Then, for the remaining days (should be between 0 and 6), use Borislav's or Fabian's function.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform