Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Return Next Non-Weekend Date
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00791392
Message ID:
00791397
Vues:
27
>Does anybody have a routine that given a date, will return the next non-weekend date?
>
>Thanks in advance
>Kirk

Try this:
LPARAMETERS lcDate AS Date

DO CASE
CASE UPPER(CDOW(lcDate)) = 'FRIDAY'
	lcDate = lcDate + 3
CASE UPPER(CDOW(lcDate)) = 'SATURDAY'
	lcDate = lcDate + 2
OTHERWISE
	lcDate = lcDate + 1
ENDCASE

RETURN lcDate
Jake
Wine is sunlight, held together by water - Galileo Galilei
Un jour sans vin est comme un jour sans soleil - Louis Pasteur
Water separates the people of the world; wine unites them - anonymous
Wine is the most civilized thing in the world - Ernest Hemingway
Wine makes daily living easier, less hurried, with fewer tensions and more tolerance - Benjamin Franklin
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform