Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Converting seconds to hh:mm:ss
Message
De
30/06/1998 18:48:00
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00113159
Message ID:
00113184
Vues:
29
>Bill,
>
>* hhmmss.prg 10-Oct-94
>*function hhmmss && 13-Feb-95 for factor of 5 speed improvement
>parameter pnElapsed
>
>local lnHours, lnMinutes, lnSeconds, lnElapsed, lcHHMMSS
>
>lnElapsed = pnElapsed
>
>lnHourDigits = max( 2, iif( ( lnElapsed > 0 ), int( log10( lnElapsed / 360 ) ), 0 ) )
>
>lnHours = int( lnElapsed / 3600 )
>lnElapsed = lnElapsed % 3600
>
>lnMinutes = int( lnElapsed / 60 )
>lnSeconds = lnElapsed % 60
>
>lcHHMMSS = padl( lnHours, lnHourDigits, '0' ) + ':' + padl( lnMinutes, 2, '0' ) + ':' + padl( lnSeconds, 2, '0' )
>return lcHHMMSS
>
>>Does any one know of a function tha converts seconds to hh:mm:ss format. For example: 110 seconds would be 00:01:50.

Dave,
It works better than the one I had from Rubel's Power Tools. Speed is of the enhance for what I need it for.

Thanks,
William Chadbourne
Senior Programmer/Analyst
State of Maine - DAFS App Team

Oracle - When you care enough to use the very best!!
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform