DEV Community

Andrews
Andrews

Posted on • Originally published at geekexcel.com on

Excel Formulas to Add Hours/Minutes/Seconds to a Datetime!!

Formulas to Add Hours/Minutes/Seconds to a Datetime in Excel Office:

In this article, we are going to see how to use the Formulas to Add Hours/Minutes/Seconds to a Datetime in Excel Office 365. Get an official version of MS Excel from the following link: https://www.microsoft.com/en-in/microsoft-365/excel

Formula Syntax:

To add Hours/Minutes/Seconds to a Datetime in Excel, use the below formulas.

Formula to add hours:

  • The below formula is used for adding hours to a date time.

=TIME(MOD(15,24),0,0)+$B$2+INT(15/24)

Example 1:

  • In the below screenshot, we entered the input date in Cell B2.
  • Then, apply the formula given.
  • Finally, it will show the results as shown in the below image.

Add hours to date-time

Formula to add minutes:

  • Use the below formula to add minutes to a date-time in Excel Office.

=TIME(INT(MOD(130,1440)/60),MOD(130,60),0)+$B$4+INT(130/1440)

Example 2:

  • Let’s consider the below screenshot to add minutes to a date-time.
  • You need to enter the input as shown below.
  • After that, apply the given formula in the selected area.
  • Now, you will get the result as shown in the image.

Add minutes to date-time

Formula to add seconds:

  • To add the seconds to a date-time, use the below formula.

=TIME(INT(MOD(4500,86400)/3600),INT(MOD(4500,3600),MOD(4500,60))+$B$6+INT(4500/86400)

Example 3:

  • In the below screenshot, we will enter the input dates.
  • Then, apply the given formula in the selected formula bar.
  • After applying the formula, it will display the result as shown below.

Add seconds to date-time

Explanations for Syntax:

  • TIME – In Excel, this function is used to calculate the correct time from the input. Read more on the TIME Function.
  • MOD – TheMOD Function will return the remainder of the two numbers after division.
  • INT ** – The main purpose of the Excel **INT Function is to round a given integer number down to the nearest integer.

Closure:

In this article, you will learn the formulas for adding Hours/Minutes/Seconds to a date-time in Excel Office 365. Kindly, share your feedback in the below comment section. Thank you so much for Visiting Our Site!! Continue learning on Geek Excel!!

Top comments (0)