Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Date problem
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00156773
Message ID:
00156777
Vues:
28
>Is there an easy way to increment the month in a date type variable ?
>
>ex:
>
>ddate = {01/01/1998}
>
>ddate + ??? = {01/02/1998}
>
>thanks !

The GOMONTH function will do what you need. To move 1 month ahead

ddate = GOMONTH(ddate, 1)

The function is smart enough to deal with the differing number of days in the month. If you increment 1 month from January 31 it will return February 28 or 29, depending whether it's a leap year.
Steve Ruhl
CitiMortgage, Inc.
steven.ruhl@citibank.com Office
Steve@steven-ruhl.com Home
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform