hi
i need some help
i cannot find a good way without lots of loops to do my code
i have a table view in my table view i have maybe 200 entries (work shifts)
the first column is a DATE
the second is a TIME (shift entry)
the third entries is a time (shift exit)
1. first thing to search is: i would like to know if there are same DATES in my table for a special month
2. all those same DATES entries should be checked if the time has a conflict.
example:
want to search all entries for september:
if found 8 entries in my tableview:
10/09/2013
11/09/2013
11/09/2013
11/09/2013
15/09/2013
18/09/2013
18/09/2013
21/09/2013
so the dates 11/09/2013 is 3 times in my table, date 18/09/2013 two times all other only one
now i want to check for all 3 entries of 11/09/2013 if there is a conflict between the times
example:
date time in time out
1. 11/09/2013, 08:00, 11:00
2. 11/09/2013, 12:00, 14:00
3. 11/09/2013, 16:00, 21:00
in this example there is no conflict between the time
another example:
1. 18/09/2013, 08:00, 16:00
2. 18/09/2013, 10:00, 17:00
here is a conflict because its cannot be that i worked between 8:00 - 16:00 and also between 10:00 to 17:00 in the same day
if the second entry would be:
1. 18/09/2013, 08:00, 16:00
2. 18/09/2013, 16:30, 18:00
then there would be conflict because i worked a shift from 8:00 to 16:00 and had 30min break and work another shift from 16:30 to 18:00
how could i check this parameters?
i know its not easy, would be great if someone could give me a solution dont need a code only solution how to check it
thank you very much
i need some help
i cannot find a good way without lots of loops to do my code
i have a table view in my table view i have maybe 200 entries (work shifts)
the first column is a DATE
the second is a TIME (shift entry)
the third entries is a time (shift exit)
1. first thing to search is: i would like to know if there are same DATES in my table for a special month
2. all those same DATES entries should be checked if the time has a conflict.
example:
want to search all entries for september:
if found 8 entries in my tableview:
10/09/2013
11/09/2013
11/09/2013
11/09/2013
15/09/2013
18/09/2013
18/09/2013
21/09/2013
so the dates 11/09/2013 is 3 times in my table, date 18/09/2013 two times all other only one
now i want to check for all 3 entries of 11/09/2013 if there is a conflict between the times
example:
date time in time out
1. 11/09/2013, 08:00, 11:00
2. 11/09/2013, 12:00, 14:00
3. 11/09/2013, 16:00, 21:00
in this example there is no conflict between the time
another example:
1. 18/09/2013, 08:00, 16:00
2. 18/09/2013, 10:00, 17:00
here is a conflict because its cannot be that i worked between 8:00 - 16:00 and also between 10:00 to 17:00 in the same day
if the second entry would be:
1. 18/09/2013, 08:00, 16:00
2. 18/09/2013, 16:30, 18:00
then there would be conflict because i worked a shift from 8:00 to 16:00 and had 30min break and work another shift from 16:30 to 18:00
how could i check this parameters?
i know its not easy, would be great if someone could give me a solution dont need a code only solution how to check it
thank you very much