Computerman
Board Regular
- Joined
- Mar 3, 2016
- Messages
- 91
I apologize in advance for the novel that follows
I have created a technician break schedule for a project that can run 20 hours or more. The schedule is dynamic in that it will expand to the number of technicians that are onsite on any given day, which varies from day to day. The technicians are given a 45 minute break after 4 hours, a one hour break 4 hours later, a 30 minute break 4 hours later, a 6 hour break 4 hours later, another 30 minute break 4 hours later, then a 1.5 hour break, a 2 hour break, another 30 minute break, and one more 6 hour break all 4 hours after the return time from the break before. The installs the technicians are performing span the country so time zones need to be accounted for. I have worked all the above out and it works well. I have also included in my project a timer that will fire off code automatically at one minute intervals (I can change that time span) which also works well. The Problem I am having is that I now want to incorporate a color coding scheme so that breaks that have passed before the current time are color coded red, breaks that are coming up within 15 to 30 minutes are color coded yellow, and future breaks, beyond the 15 to 30 minute window for upcoming breaks are not color coded. However, when I put in code to check if the cells time is after the current time it does not take into account which day the time in the cell is referring to. So not only are the cells that contain the break times for this morning coloring red, which they should, but the times for tomorrows break times are also coloring red, which they should not. Futhermore, when I check the cells that contain the break times, some of the cells just have the time, while others have a date of 1/1/1900 and the time although the same time calculations are used to fill out all the cells. If you have continued to read this novel to this point I thank you, if you have any suggestions to resolve my issues, I thank you again.
Computerman
I have created a technician break schedule for a project that can run 20 hours or more. The schedule is dynamic in that it will expand to the number of technicians that are onsite on any given day, which varies from day to day. The technicians are given a 45 minute break after 4 hours, a one hour break 4 hours later, a 30 minute break 4 hours later, a 6 hour break 4 hours later, another 30 minute break 4 hours later, then a 1.5 hour break, a 2 hour break, another 30 minute break, and one more 6 hour break all 4 hours after the return time from the break before. The installs the technicians are performing span the country so time zones need to be accounted for. I have worked all the above out and it works well. I have also included in my project a timer that will fire off code automatically at one minute intervals (I can change that time span) which also works well. The Problem I am having is that I now want to incorporate a color coding scheme so that breaks that have passed before the current time are color coded red, breaks that are coming up within 15 to 30 minutes are color coded yellow, and future breaks, beyond the 15 to 30 minute window for upcoming breaks are not color coded. However, when I put in code to check if the cells time is after the current time it does not take into account which day the time in the cell is referring to. So not only are the cells that contain the break times for this morning coloring red, which they should, but the times for tomorrows break times are also coloring red, which they should not. Futhermore, when I check the cells that contain the break times, some of the cells just have the time, while others have a date of 1/1/1900 and the time although the same time calculations are used to fill out all the cells. If you have continued to read this novel to this point I thank you, if you have any suggestions to resolve my issues, I thank you again.
Computerman