Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Datetime variation in HH:MM:SS
Message
De
07/09/2002 16:59:38
 
 
À
07/09/2002 16:48:20
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00697929
Message ID:
00697949
Vues:
22
>I've probably written this function 10x since the FoxBASE+ days, I keep losing them... the last one I wrote two days ago:
* This routine converts a numeric value representing seconds,
>* into a character string of hh:mm:ss format.
>* Anything over 24 hours is still expressed as hours e.g. 174:22:31
>LPARAMETERS ;
>	tnSeconds
>
>LOCAL ;
>	lnHours, ;
>	lnMinutes, ;
>	lnSeconds
>
>lnHours = INT(tnSeconds / 3600)
>lnMinutes = INT((tnSeconds - (lnHours * 3600)) / 60)
>lnSeconds = (tnSeconds - (lnHours * 3600) - (lnMinutes * 60))
>
>RETURN ;
>	LTRIM(STR(lnHours)) + [:] ;
>		+ PADL(LTRIM(STR(lnMinutes)), 2, [0]) + [:] ;
>		+ PADL(LTRIM(STR(lnSeconds)), 2, [0])
Ok, this one contains the missing part I was looking for. Thanks
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform