Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Counting weekdays between two dates
Message
De
21/06/2004 11:01:20
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
21/06/2004 09:46:28
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00915620
Message ID:
00915649
Vues:
10
>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)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform