Working with time DURATION, not time of day

后端 未结 9 928
后悔当初
后悔当初 2020-12-13 17:07

I\'m doing some benchmarking, and I want to use Excel to produce graphs of the results. I\'ve got a simple but annoying problem which is baking my noodle.

The proble

相关标签:
9条回答
  • 2020-12-13 17:30

    With custom format of a cell you can insert a type like this: d "days", h:mm:ss, which will give you a result like 16 days, 13:56:15 in an excel-cell.

    If you would like to show the duration in hours you use the following type [h]:mm:ss, which will lead to something like 397:56:15. Control check: 16 =(397 hours -13 hours)/24

    enter image description here

    0 讨论(0)
  • 2020-12-13 17:30

    Let's say that you want to display the time elapsed between 5pm on Monday and 2:30pm the next day, Tuesday.

    In cell A1 (for example), type in the date. In A2, the time. (If you type in 5 pm, including the space, it will display as 5:00 PM. If you want the day of the week to display as well, then in C3 (for example) enter the formula, =A1, then highlight the cell, go into the formatting dropdown menu, select Custom, and type in ffffdd.

    Repeat all this in the row below.

    Finally, say you want to display that duration in cell D2. Enter the formula, =(a2+b2)-(a1+b1). If you want this displayed as "22h 30m", select the cell, and in the formatting menu under Custom, type in h"h" m"m".

    0 讨论(0)
  • 2020-12-13 17:36

    Highlight the cell(s)/column which you want as Duration, right click on the mouse to "Format Cells". Go to "Custom" and look for "h:mm" if you want to input duration in hour and minutes format. If you want to include seconds as well, click on "h:mm:ss". You can even add up the total duration after that.

    Hope this helps.

    0 讨论(0)
提交回复
热议问题