Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP 5.0 bug ??? What happend with Seconds() ??????
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00178833
Message ID:
00178834
Views:
29
What exactly happens when VFP crashes? Does it just freeze or is there an error message? Is it possible that something in your code is causing an infinite loop?

Keep in mind that SECONDS() won't reset at midnight. It's really the number of seconds since midnight the day you loaded VFP. Just a thought...

>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 )
>...
>*** Process Begin
>...
>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!!!!!!!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform