Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Converting seconds to hh:mm:ss
Message
From
01/07/1998 06:41:54
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00113159
Message ID:
00113293
Views:
34
>Ed,
>
>The PAD() functions will directly do the work you are using str() and alltrim() for in your version.
>
Thanks, I didn't realize that PADL() worked with numerics.

>>
>>LPARAMETER nElapsedSecs
>>LOCAL dRefPoint, cReturnString
>>dRefPoint = DTOT(DATE() ) + nElapsedSecs
>>cReturnString = PADL(ALLTRIM(STR(HOUR(dRefPoint),2)),2,'0') + ':' + ;
>>                          PADL(ALLTRIM(STR(MINUTE(dRefPoint),2)),2,'0') + ':' + ;
>>                          PADL(ALLTRIM(STR(SEC(dRefPoint),2)),2,'0')
>>RETURN cReturnString
>>
>>
>>You can get the number of days with TTOD(dRefPoint) - DATE(). You can speed it up slightly by using a date constant in place of DATE().
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform