I made an attempt to get you a solution for this. Here is what I did:
1. Added a column called Group Number in the data source with the formula as shown below:
2. Added one more column called Row Number in the data source with the formula as shown below:
3. Joined this data file with itself with the join condition as shown below. This should get you the details of the next record.
4. Created 4 calculated fields as shown below.
For the total quantity, there is an explicit division by 2 because for every date-timestamp, there are 2 records. Ideally, I would expect only 1 record per date-timestamp.
5. Here is the final output:
Hope this helps. I have attached the workbook and the updated data source file.