Hello sorry my VBA skills are very poor.
If I want to add to this and add another field, should we say "Make"
How would I add to this code so it splits the colors as per the code below but also includes the 'Make' into each row?
ID colors Make
1 white, black, red Crown
2 red, orange Dulux
3...
Yes I changed the query date format to match mm/dd/yyyy hh:nn
Still all fail
Checking the code it refers to ChangeStart, in_ChangeEnd however the DB has
Change_Start & Change_End which I can easily change.
Should both these lines refer to ChangeStart??
dt_MustStartBy = CDate(DatePart("m"...
Hi Plog
Many thanks, All the records are returning a value of "Fail"?
If I look at the output
957 should = Pass
949 should = Pass
944 should = Pass
943 should = Pass
959 should = Pass
942 should = Pass
Many Thanks, bit of a brain teaser than looks easy enough but doesn't behave as expected, I've also added in an HRSDIFF because if that exceeds 840mins it means its also failed or spread over multiple days because 18:00 to 08:00 is 840mins.
In practice it could be different, however I keep the allowed start and end times in a table and refer to the fields.
However mainly its 18:00 - 08:00 so I want to focus on these times to ensure every test is correct in this timeframe . I'm finding that mostly what I try works, but certain...
ActualWorkStart, ActualWorkEnd, AvailableStart, AvailableEnd, Result
09/06/2016 02:00 09/06/2016 05:00:00 18:00 08:00 Fail
Sorry Plog, I didn't move the posts honest i appreciate your help, A change can start and end at any time...
Mainly works
But those after Midnight but before 08:00 on the same day fail when they should
pass. I wonder if I need to split the time check before midnight and after?
CHANGE_START CHANGE_END Result
03/06/2016 22:00:00 04/06/2016 08:00:00 Pass
03/06/2016...
I also need to take into account the end date,
So the time of the change must not be before 6PM
And the end time must be before 8AM
So between Start Time 1/5/2016 18:00 And End Time 1/5/2016 08:00 is OK.
Start Time 1/5/2016 17:59 And End Time 1/5/2016 08:00 is FAIL
Start Time 1/5/2016 18:00 And...