Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to get the number of months between 2 dates ?
Message
From
25/11/1999 12:19:50
 
 
To
25/11/1999 10:23:46
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00295544
Message ID:
00295594
Views:
28
>How to get the number of monts when date1 is substracted from date2?

Since months don't have fixed length, the QUAD method I use is:

FUNC NumMonths
LPARAMETER tdDate1, tdDate2
RETURN ABS((YEAR(tdDate1)*12+MONTH(tdDate1)) - (YEAR(tdDate2)*12 + MONTH(tdDate2)))
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform