Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Datetime - datetime
Message
From
23/01/2001 01:32:50
 
 
To
23/01/2001 01:11:41
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00467137
Message ID:
00467143
Views:
12
>I am substracting two datetime values which gives a datetime. Now, with that value, I want to convert that in how many days and how many hours. Is there a function somewhere to do that?

No, datetime arithmetic yields results in seconds. So:
lt2 - lt1 = lnSecondsDifference
lnDaysDifference = INT(lnSecondsDifference / 86400)
lnHoursRemainder = (lnSecondsDifference - (lnDaysDifference * 86400)) / 3600
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform