Snowflake68
Registered User.
- Local time
- Today, 08:26
- Joined
- May 28, 2014
- Messages
- 452
I have a form that automatically refreshes after a set time which is set by the user. They can set the refresh rate to anything from 5 seconds to 120 seconds using a dropdown box on the same form.
This all works and I also have a text box displaying the date and time of the time the form was last refreshed. All good so far.
What I would like is another text box counting down the seconds to the next refresh but I am stuck on how to achieve this.
I have placed a subform with a clock of the current time which is working. I then tried to calculate the time that the form will next refresh by adding the current time to the refresh rate. But this is not working because adding say 10 to the current date and time are just adding 10 days and not 10 seconds.
Any ideas how to convert the current date and time into seconds so that I can just add the number of seconds and then convert it back into a date and time again.
Not sure if this work but if anyone has any other ideas I will give them a try.
Thanks
This all works and I also have a text box displaying the date and time of the time the form was last refreshed. All good so far.
What I would like is another text box counting down the seconds to the next refresh but I am stuck on how to achieve this.
I have placed a subform with a clock of the current time which is working. I then tried to calculate the time that the form will next refresh by adding the current time to the refresh rate. But this is not working because adding say 10 to the current date and time are just adding 10 days and not 10 seconds.
Any ideas how to convert the current date and time into seconds so that I can just add the number of seconds and then convert it back into a date and time again.
Not sure if this work but if anyone has any other ideas I will give them a try.
Thanks