Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What is the best to check that diff betwen 2 dates is 1
Message
De
25/05/2007 17:09:01
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
25/05/2007 16:57:15
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Divers
Thread ID:
01228601
Message ID:
01228611
Vues:
12
>But how do I check the difference in the dates?

If all you want is to see whether MORE or LESS than a year passed between the two dates, you don't need to.

Let's assume Date1 <= Date2, and Date2 must not be more than 1 year after Date1.

Just check if Date2 <= gomonth(Date1, 12). If .T., at most one year has elapsed between the dates.
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