Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Action time
Message
From
02/01/2003 02:18:56
 
 
To
02/01/2003 01:45:02
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00737184
Message ID:
00737251
Views:
20
Chaim

Dave's code does work correctly. Try it again in an even more simple format below. I have removed your cursor code and put in a wait state. I have also changed the message to your preference. The principle is correctly the subtraction of a start datetime() from an end datetime():
lnStart = datetime()
=inkey(2)
lnElapsed = datetime() - lnStart
lcElapsed = ttoc( {^2001-1-1} + lnElapsed, 2 )
Messagebox( "Your operation done in " + lcElapsed + " seconds!" ) 
Update: Using VFP7.

>Sorry,
>I want to get a messgebox for example: 'Your operation done in 147 seconds!'.
>Please run your following code, and you will not get the time elapsed only other thing
>Here is your code:
>lnStart = datetime()
>create cursor test (id i)
>for i =1 to 700000
>insert into test value (i)
>endfor
>lnElapsed = datetime() - lnStart
>lcElapsed = ttoc( {^2001-1-1} + lnElapsed, 2 )
>Messagebox( "Elapsed time:" + lcElapsed)
In the End, we will remember not the words of our enemies, but the silence of our friends - Martin Luther King, Jr.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform