Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Calculate number of months
Message
De
27/08/2002 15:10:40
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
27/08/2002 14:33:39
Jerry Tovar
Dana Corporation Dana It
Maumee, Ohio, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00694170
Message ID:
00694193
Vues:
15
>Using VFP7.
>
>How can I calculate the number of months between 2 dates?
>
>x = {^2001/08/01}
>y = {^2002/08/31}
>
>Want to return 12 months. How can I do this?
>
>Thanks,
>
>Jerryt
? int((val(dtos(x)) - val(dtos(y))) / 100)
Divide by 1e4 to get total number of elapsed years.

HTH, Hilmar.
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