Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Add or Subtract Whole Years or Months
Message
From
28/05/2004 08:07:36
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00907917
Message ID:
00908085
Views:
25
>Alex, what if the Yoear is leap?
>I think Sergey's suggestion is more acurate:
>
>Convert it to DateTime and add number of secods:
>
>For 1 year:
>
>? Dtot()+(365*24*60*60)
>
>
>next_y   = GOMONTH({^2003/05/27},12)
>? next_y
>before2m = GOMONTH({^2003/05/27},-2)
>? before2m
>nexty2m  = GOMONTH(next_y,-2)
>? nexty2m
>
Correct. I forgot about that one. <g>


Alex Feldstein, MCP, Microsoft MVP
VFP Tips: English - Spanish
Website - Blog - Photo Gallery


"Once again, we come to the Holiday Season, a deeply religious time that each of us observes, in his own way, by going to the mall of his choice." -- Dave Barry
Previous
Reply
Map
View

Click here to load this message in the networking platform