Subtracting time to produce time in previous day.

HighAndWilder

Active Member
Joined
Nov 4, 2006
Messages
376
Office Version
  1. 365
Platform
  1. Windows
Hi

I would like to be able to subtract a combination of hours, minutes and seconds from a date and time.

The resultant time may be in the previous day and that is where the problem is.

For example :

10/08/2019 01:08:00

I would like to be able to subtract 1 hour and 15 minutes from this time which should result in the following:

09/08/2019 23:53:00 a time in the previous day.

Does anybody know how to do this?

I would like to represent the time elements to subtract as negative numbers and add them to the time so that I can, using the above example, add minus 1 hour and minus 15 minutes to 10/08/2019 01:08:00.

Thanks
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
This works
- adapt to your own situation
Excel 2016 (Windows) 32 bit
A
B
C
D
E
1
TimeHoursminutesresult formula in D2
2
10/08/2019 01:08​
1​
15​
09/08/2019 23:53​
=A2-(B2+C2/60)/24
Sheet: Sheet1


I would like to represent the time elements to subtract as negative numbers and add them to the time so that I can, using the above example, add minus 1 hour and minus 15 minutes to 10/08/2019 01:08:00.
- unsure what this means:confused:
- if you cannot figure out what to do based on above example, then post a table of required results including both positive and negative examples
 
Upvote 0
Below is for US date system. One hour and 15 mins is (1.25 hours/24 hours/day) days.
Excel Workbook
AB
18/10/2019 1:088/9/2019 23:53
Sheet1
 
Upvote 0

Forum statistics

Threads
1,213,546
Messages
6,114,251
Members
448,556
Latest member
peterhess2002

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top