digitaldrew
Well-known member
- Joined
- Nov 10, 2012
- Messages
- 167
- Programming Experience
- Beginner
I have a scheduler in my program which can be enabled to kick off the series of events at a later time. When the scheduler is enabled and the program is started I'd like to post 2 things into the log, the amount of time its scheduled to run and the amount of time before the software kicks off.
I had no problems doing this when you were running the software within 24hrs. However, I would have problems when trying to schedule this for over 24 hours in the future (for example, 31 hours). This was my initial code
If I were to try and schedule my program for 31 hours from now, it would instead come up showing 7 hours..
Is there anyway I can take this and make it display the number of days if it will be over 24hrs?
I also tried using a 24hr clock..
When trying this I get a completely different error: Input string was not in a correct format.
Thanks in advance!
I had no problems doing this when you were running the software within 24hrs. However, I would have problems when trying to schedule this for over 24 hours in the future (for example, 31 hours). This was my initial code
VB.NET:
txtLog.AppendText("TOTAL TIME SCHEDULED TO RUN: " & intervalsked.ToString("hh\:mm\:ss") & vbCrLf)
txtLog.AppendText("TOTAL TIME BEFORE STARTING: " & beforestart.ToString("hh\:mm\:ss") & vbCrLf)
If I were to try and schedule my program for 31 hours from now, it would instead come up showing 7 hours..
Is there anyway I can take this and make it display the number of days if it will be over 24hrs?
I also tried using a 24hr clock..
VB.NET:
txtLog.AppendText("TOTAL TIME SCHEDULED TO RUN: " & intervalsked.ToString("HH:mm:ss") & vbCrLf)
txtLog.AppendText("TOTAL TIME BEFORE STARTING: " & beforestart.ToString("HH:mm:ss") & vbCrLf)
When trying this I get a completely different error: Input string was not in a correct format.
Thanks in advance!