Calculating the duration between two times is simple in Excel once you understand how to format the cell correctly.
نفّذه بالذكاء الاصطناعيEnter your start and end times
Type your start time in one cell (e.g., A2) and your end time in another (e.g., B2).
Subtract the times
In a new cell, enter the formula =B2-A2 to find the difference.
Apply custom time formatting
Right-click the result cell, select 'Format Cells', go to the 'Number' tab, choose 'Custom', and enter [h]:mm to display total hours.
=B2-A2This happens when the result is a negative time value. Ensure your end time is later than your start time.