Hi all,
I have a form with 2 text boxes: one for time of start th process and the other for the elapsed time. Also, I have a command button to start the process
At the cmdStart.click() method I put the fllow code:
nStartTime = Seconds()
dStartDate = Date()
thisform.txtStartTime.Value = ssTohh( nStartTime )
thisform.txtElapsed.Value = ssTohh( 0 )
...
...
Do While <I>main condition</i>
...
nDiff = Date() - dStartDate
nSeconds = Seconds()
nElapsed = (nDiff*86400) + nSeconds - nStartTime
thisform.txtElapsed.Value = ssTohh( nElapsed )
...
EndDo
ssTohh is a function that convert seconds to hh:mm:ss
This code work Fine if run in the same day, but...
If I run the process before midnight, when the day change, VFP crash.Is this a VFP 5.0 bug ????
Please try to test this code and help me! I need to run a process at 23:00 every day and it take 1 or 2 hours and the client want to know the elapsed time.
Thaks in advance for your time!!!!!!!
Lic. Esteban Bruno
Gerente de Sistemas
TASSO S.R.L.