Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Time Elapsed
Message
From
03/01/2000 16:16:17
 
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00311903
Message ID:
00311908
Views:
13
>Can anybody help me to create a function that returns the time elapsed since midnight in HH:MM:SS and to midnight in the same format.

And to go to midnight:
FUNCTION midnight
LOCAL nSecsMidNight, nHours, nMinutes, nSeconds, cElapsed
nSecsMidNight = 86400 - SECONDS()
nHours = INT(nSecsMidNight/3600)
nMinutes = INT((nSecsMidNight-nHours*3600)/60)
nSeconds = MOD(nSecsMidNight,60)
cElapsed = TRANSFORM(nHours,"@L 99") + ":" + ;
           TRANSFORM(nMinutes,"@L 99") + ":" + ;
           TRANSFORM(nSeconds,"@L 99")
RETURN cElapsed
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Previous
Reply
Map
View

Click here to load this message in the networking platform