Date & time subtraction

mrinal saha

Board Regular
Joined
Jan 20, 2009
Messages
229
HI Folks,

I have date & time in once cell as below

6/28/2012 12:04 am

What i want is to subtract 4 hrs from time ie; (12:04 - 4) = 8:04 pm and date should also change to 6/27/2012.

so my result would in another cell should look like

6/27/2012 8:04 pm

Is there any excel formula?

Thanks,
Mrinal
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
HI Folks,

I have date & time in once cell as below

6/28/2012 12:04 am

What i want is to subtract 4 hrs from time ie; (12:04 - 4) = 8:04 pm and date should also change to 6/27/2012.

so my result would in another cell should look like

6/27/2012 8:04 pm

Is there any excel formula?

Thanks,
Mrinal
Try this...

A2 = 6/28/2012 12:04 AM

This formula entered in B2:

=A2-TIME(4,0,0)

Format in the date/time style of your choice.
 
Upvote 0

Forum statistics

Threads
1,203,069
Messages
6,053,352
Members
444,655
Latest member
didr

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