Chaim,
The code does work perfectly well, it displays the elapsed time in hh:mm:ss format, significantly easier than the code posted in the FAQ referenced in another message in the thread.
If all you want is the elapsed time in seconds then just use:
lnStart = datetime()
...run process
lnElapsed = datetime() - lnStart
Messagebox( "Elapsed time:" + transform( lnElapsed ) )
I find that users like hh:mm:ss better than just a raw number of seconds.
>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)