I first split the date on the space to isolate the date and did the appropriate conversions. I then calculated the hour and the date on which the shift began, by using the following formula:
if Between([Hour], 0, 5) then
DateTimeAdd([DateTime_Out],-1, "days")
else [DateTime_Out] endif
Then it was a simple task of summarising and sampling.
I realise I did some unnecessary steps with the date conversions but I couldn't go back and clean it up due to laziness.


