Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding 1 year to a date
Message
From
17/10/2000 16:11:17
 
 
To
17/10/2000 15:40:29
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00430291
Message ID:
00430550
Views:
9
>>I need to add 1 or more year to the start date in a lease application. I use dStartdate + 365 but it does not work for leap years. I coul do something like YEAR(dStartdate) MOD 4 but I was wandering if there was not a simpler method.
>
>If someone doesn't have VFP 6, you could do:
>
>?date(year(date()) + 1, month(date()), day(date()))

Try this, Hotshot:

dDate = {2/29/2000}
?DATE(YEAR(dDate) + 1, MONTH(dDate), DAY(DDAte))

:-)
Erik Moore
Clientelligence
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform