Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding whole years to a date (code/function request)
Message
 
To
29/01/2003 11:11:57
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00746716
Message ID:
00746730
Views:
24
>I want to know if someone has a neet function to add/substract whole years to a date or datetime. It needs to take into account leap years and check that it doesn't produce illegal dates (ex: add 5 years to Feb 29 2004).
>
>I know I could code the long way - but is there some FOXPRO function (foxpro has a function for everything) or ellegant snippet that I can use.
>
>Thanks from frigid Ottawa Canada

Try
? GOMONTH(DATE(2004, 2, 29), 12 * 5)
George

Ubi caritas et amor, deus ibi est
Previous
Reply
Map
View

Click here to load this message in the networking platform