That is pretty much what I tried to describe in my comment. The code to determine would look something like this (missing the reference to the table that you would have to provide).
Table current = Table("GlobalTable1");
for(int row = 1; row <= current.numRows; row++)
{
DateTime entryTime = DateTime(current[row]["InputTimestamp"]);
if(entryTime.hour >= 5 && entryTime.hour < 12)
{
current[row][3] = 1;
continue;
}
if(entryTime.hour >= 12 && entryTime.hour < 22)
{
current[row][3] = 2;
continue;
}
current[row][3] = 3;
}
This code loops through the entire table. If you add the entries one by one you can of course directly compute the shift for just that row.
To then get the average into a bar chart you can use a calculated table to get the average value of the Difference column partitioned by the shift.
Either use the options on the first and third tab to generate the query or enable the direct editing to type it in manually.
