Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What is the best to check that diff betwen 2 dates is 1
Message
From
25/05/2007 17:09:01
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
25/05/2007 16:57:15
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01228601
Message ID:
01228611
Views:
21
>But how do I check the difference in the dates?

If all you want is to see whether MORE or LESS than a year passed between the two dates, you don't need to.

Let's assume Date1 <= Date2, and Date2 must not be more than 1 year after Date1.

Just check if Date2 <= gomonth(Date1, 12). If .T., at most one year has elapsed between the dates.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform