Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Anybody have a datediff class for foxpro
Message
From
27/08/2002 11:26:23
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00694033
Message ID:
00694038
Views:
14
>Wondering if anyone has coded a routine to take two datetime fields and return various information regarding them, such Years,Months,Days,Hours
>
>Thanks
>Kirk

What exactly do you want to know?

For instance, if you want total elapsed days, you can use:
? int((x-y)/86400)
Another method for total elapsed days (which can be extended more easily to years or months):
? int((val(ttoc(x,1)) - val(ttoc(y,1))) / 1e6)
HTH, Hilmar.
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
Next
Reply
Map
View

Click here to load this message in the networking platform