Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Date Calculation
Message
De
03/01/2007 19:35:55
 
 
À
03/01/2007 12:57:23
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01181507
Message ID:
01182054
Vues:
10
>Here is the function that I am using that is giving different result as everyone else. Please help.
>
>PARAMETERS d1,d2
>
>if (type("d1")="D" and type("d2")="D") && both variables present?
> wd=0 && variable to hold total number of weekdays
> for D=0 to d2-d1
> if between(DOW(d1+D),2,6) && 2=Mon 6=Fri
> wd=wd+1
> endif
> endfor
> return wd
>else
> return 0
>endif

You might also set what is the first day of the week and then restore the user's default:
lnFDay = SET("Fdow")
SET FDOW TO 1    && Ensure first day of week is Sunday
...
...
SET FDOW TO lnFDay
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform