close

轉自 https://www.extendoffice.com/documents/excel/3441-excel-subtract-hours-from-date.html

--

 Add or subtract hours from a date/time field with formulas

You can apply the following formulas to add or subtract hours from a date/time field in Excel.

Add hours to a date/time field

If you want to add 12 hours to a date/time field as below screenshot, you can apply the following formula.

doc subtract hours 1

1. Select a blank cell says cell C2, enter formula =A2+12/24 into the formula bar, and then press the Enter key.

doc subtract hours 1

Note: In the formula, A2 contains the date/time field, 12 is the hours you need to add to the date/time field. You can change them based on your need.

Then you will get the final date and time after adding certain hours to a date/time field.

Subtract hours from a date/time field

For subtracting 12 hours from a date/time field, you can apply this formula =A2-12/24. See screenshot:

doc subtract hours 1

--

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 dizzy03 的頭像
    dizzy03

    碎碎念

    dizzy03 發表在 痞客邦 留言(0) 人氣()