Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating a schedule with a twist 2

Status
Not open for further replies.

redsand23

Technical User
Feb 22, 2002
77
US
I have a query that prioritized and determines actual hh:mm:ss each job takes. For example
pri job time
1 abc 04:20:00
2 bca 01:10:00

I want to be able to popluate this data into a grid or calendar control based on a start time of 08:00am in 5 minute increments. Here is what I am having problems with. I need to exclude break periods and lunch. So when job abc runs through their first break I need to set an end time that takes this into consideration. The end time will be the start time for job bca.

Any ideas other than a hellatious if statement that can accomplish this.
Thanks in advance
 
Break your day up into numbered work segments only and exclude the break an lunch periods. Then you can populate a grid easily.

Example (using 15 minute segments):
Work day from 8AM to 5PM
Morning break 10:00AM to 10:15AM
Lunch: 12 noon to 1:00PM
No afternoon break.

(15 minute) segments:
8AM to 10:00AM: 8 segments numbered 1-8
10:15AM to 12 noon: 7 segments numbered 9-15
1:00PM to 5PM: 16 segments numbered 16-31

3 jobs:
A 45 minutes (3 segments)
B 4.5 hours (18 segments)
C 2.5 hours (10 segments)

A work from segment 1 to segment 3 (8:00AM to 8:45AM)
B work from segment 4 to segment 21 (8:45AM to 2:30PM)
C work from segment 22 to segment 31 (2:30PM to 5:00PM)

By working with segment numbers rather than specific times for your calculations and the converting the segment numbers to specific start and end times when you actually display or print the time schedule, it shouldn't be too hard to calculate what you need.

If you have multiple time/break schedules, just have a table that lists each different time schedule (with segments numbered) and relate the correct break schedule with the person.

Hope this helps.

Bob S.
 
What would my table look like. Would it look like this? Would you have an small example as to how I would populate the grid.
Time Segment
08:00 1
08:15 2
Again, I appreciate any help!!!

 
Yes, the table would be something like you describe. Use the example I describe. The only thing you need to add is to calculate the number of segments (minutes divided by minutes per segment will give you the number of segments).

Bob S.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top