Link to home
Create AccountLog in
Avatar of GRChandrashekar
GRChandrashekarFlag for India

asked on

Subtract X hours from given datetime

Hi, I need to subtract X hours from given datetime cell in Excel 2007.

It works fine if i subtract till 24 hours. example: A1-TIME(24,0,0).

If i have to subtract 72 hours from Cell having value as 14/03/2013 4:00 AM it does not work as it does not recognize 72 hours but only works if it is 24 hours. But this is very critical for me. So how to achieve this ?
Avatar of NBVC
NBVC
Flag of Canada image

Try:

=A1-72/24

formatted as Date/Time (you can make 72 variable)
Avatar of GRChandrashekar

ASKER

This case, I can minus only minutes ! so no consistency. With your suggestion I cant subtract minutes !
Then

=A1-(72+45/60)/24

where 72 hours and 45 minutes
Let us take this example.

My cell format is dd/mm/yyyy hh:mm AM/PM.
Cell value is 30/03/2013 04:00 AM
I need output 28/03/2013 10:00 AM.

So how to get it ?
ASKER CERTIFIED SOLUTION
Avatar of NBVC
NBVC
Flag of Canada image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer