Is endTime for each entry always startTime + 1 hour ? If that is the case then you can create a timetable with startTime, A and B and then use retime to resample your time stamps to be hourly. I would suggest using a timetable instead of a table when working with time-stamped data as that would give you access to useful functions specific to time related data.
data = timetable(startTime,A,B);
hourlyData = retime(data,"hourly","fillwithconstant","Constant",0)
ans =
19×2 timetable
startTime A B
____________________ __ ___
12-Sep-2019 21:00:00 10 2
12-Sep-2019 22:00:00 1 0
12-Sep-2019 23:00:00 0 0
13-Sep-2019 00:00:00 0 0
13-Sep-2019 01:00:00 2 0
13-Sep-2019 02:00:00 0 0
13-Sep-2019 03:00:00 0 0
13-Sep-2019 04:00:00 0 0
13-Sep-2019 05:00:00 1 0
13-Sep-2019 06:00:00 0 0
13-Sep-2019 07:00:00 0 0
13-Sep-2019 08:00:00 0 0
13-Sep-2019 09:00:00 0 0
13-Sep-2019 10:00:00 0 0
13-Sep-2019 11:00:00 0 0
13-Sep-2019 12:00:00 0 0
13-Sep-2019 13:00:00 8 91
13-Sep-2019 14:00:00 36 190
13-Sep-2019 15:00:00 6 18
% If you need the endTimes you can add them after this
hourlyData.endTime = hourlyData.startTime + hours(1);