Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Time Elapsed
Message
From
06/06/2002 14:20:21
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00665357
Message ID:
00665611
Views:
16
>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

Ria,

you may want to consider this
starttime = DateTime()
* carry out the action
timetaken=DateTime() - starttime && delta in seconds
x = ttoc( { 00:00 } + timetaken, 1)
x = substr(x,9,2) + ':' + substr(x,11,2) + ':' + right(x,2)

? x
Gregory
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform