Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to calculate exact months and days btwn 2 dates
Message
From
13/09/2004 13:50:11
 
 
To
13/09/2004 13:19:16
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00941652
Message ID:
00941658
Views:
14
This message has been marked as a message which has helped to the initial question of the thread.
>how to calculate exact months and days btwn 2 dates ?
>Rajesh
try this :
LPARAMETERS td1 , td2 

x1=YEAR(td1)*12+MONTH(td1)
x2=YEAR(td2)*12+MONTH(td2)
numMonth=x2-x1
numDays=td2-GOMONTH(td1 ,numMonth)

RETURN TRANSFORM(numMonth)+","+TRANSFORM(numDays)
Peter
Peter Cortiel
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform