Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Lazy Man Request
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00631578
Message ID:
00631595
Views:
20
Try this:

nDuration = 7200
nDays = 0
nHours = 0
nMinutes = 0
= HowLong(nDuration, @nDays, @nHours,@nMinutes)
?nDays
?nHours
?nMinutes

nDuration = 420
nDays = 0
nHours = 0
nMinutes = 0
= HowLong(nDuration, @nDays, @nHours,@nMinutes)
?nDays
?nHours
?nMinutes

FUNCTION HowLong
LPARAMETER nDuration, nDays, nHours, nMinutes
** NOTE: The last three parms are passed by reference
LOCAL nDay
* How long is a day
nDay = 24 * 60
* Number of days
nDays = INT(nDuration/nDay)
* Remove the days
nDuration = nDuration - (nDays * nDay)
* How many hours
nHours = INT(nDuration/60)
* Remove the hours
nMinutes = nDuration - (nHours * 60)


>Does anybody have a routine written (that they will share) that will take an integer that represents minutes and turn it into a text format for hours/days
>
>Example: 7200 would return 5 Days
> 420 would return 7 Hours
>
>Thanks in advance.
>
>Kirk
Paul G Brown, MCSD
Paul G Brown
paul@paulgbrown.com
Previous
Reply
Map
View

Click here to load this message in the networking platform