Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Time Elapsed
Message
De
06/06/2002 08:23:16
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00665357
Message ID:
00665360
Vues:
14
>Does FoxPro have a function that converts seconds
>to hour:minute:second?
>
>I am trying to calculate the time FoxPro takes to
>perform an action. I tried doing it this way:
>
> starttime=seconds()
>
> * carry out the action
>
> timetaken=seconds() - starttime
>
>Should I write a function to convert 'timetaken' to
>hours/minutes/seconds?
>
>Ria

Yes, I think your only viable option is to write your own function.

Use / (division) and % (remainder). Also, use padl(number, 2, "0") to fill out with zeroes.

HTH, Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform