How to get the hour and minutes difference between

2019-03-23 08:58发布

问题:

Suppose I have 2 timestamp dates:

  1. 2/24/2010 1:05:15 AM
  2. 2/25/2010 4:05:17 AM

Can anyone please advise what function should I use in Excel to get the difference in hours and minutes?

Thanks.

回答1:

The difference in hours:

=(A2-A1)*24

The difference in minutes:

=(A2-A1)*24*60

The difference in hours and minutes:

=TRUNC((A2-A1)*24)      - the hours portion
=MOD((A2-A1)*24*60,60)  - the minutes portion


回答2:

this is straight simple in excel and no need to do anything except applying the time format to the cell.

two easy steps:

  1. put the formula: =B2-A2
  2. simply apply the custom format "h:mm" to the cell.


回答3:

Try this : http://office.microsoft.com/en-us/excel/HP100704681033.aspx



回答4:

Excel is able to handle date and time arithmetic. It does this by holding the dates and times as decimals. If you key in a date and time in a format that Excel recognises it will (helpfully!) hold the data as a date and time data type. The integer bit is days, and the decimal bit is time. You can use a time cell format to display the time bit in hours minutes seconds etc, or you can convert the decimal to hours, minutes and seconds using 60 in a simple formula

The text formula works by displaying the answer in a time format.