Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Date problem
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00156773
Message ID:
00156777
Views:
34
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform