Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DateDiff
Message
De
22/02/2001 05:40:16
 
 
À
22/02/2001 05:38:46
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00478312
Message ID:
00478320
Vues:
22
>>I need to write a DateDiff function for differences in Months, the closest I can come to is:
>>
>>INT((tdEndDate-tdStartDate)/30)
>>
>>Which is a bit assumptious, I understand that there is a long way of doing this by checking which 2 months you are comparing and altering the figures accordingly, but I was wondering if there was a straight forward way of doing it.
>>
>>Thanks
>>Kev
>
>By differences in months do you mean...
>15 Jan 2000 - 30 Mar 2000 = 3 months?
>
>If so then
>? month(tdEndsate) - month(tdEnddate)
>
>HTH
>
>Will

BUT... I forgot about years...

If this func spans a year boundary then it does not work...

I am sure I have seen a similar thread a few months ago.

Will
Will Jones
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform