Link to home
Start Free TrialLog in
Avatar of Jonathan Gagliardi
Jonathan GagliardiFlag for United States of America

asked on

Excel change dates in column by minus 7 hours

I have a report coming in that the time is off by 7 hours.  I need to change the time to -7 hours for the whole column.  Any ideas on how to do this.
Avatar of Tj a
Tj a

Assuming that the times you want to change are in column A, you could insert "7:00:00" in an empty cell e.g cell D4
In a new column use the formula "=SUM(A1 + $D$4)" This should change the time to 7 hours ahead. drag down the formula.
ASKER CERTIFIED SOLUTION
Avatar of Professor J
Professor J

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Jonathan Gagliardi

ASKER

Date and time look like this 7/7/2015 2:24:38 AM
 
 and need to be -7 hours not +7
Professor JimJam, your solution almost works but it takes away the date.
what do you mean takes away date?   you mean to reformat the column where you have put the formula
please see attached.

seven before this date and time 7/7/2015 2:24   becomes previous date 7/6/2015 19:24

and if 7/6/2015 19:24 result is incorrect then please tell me what should be the correct result for date 7/7/2015 2:24 conversion of -7
Book1.xlsx
Assuming your date and time is in A1, then try this......

=INT(A1)+MOD(A1-INT(A1)-TIMEVALUE("7:0:0"),1)

Is this what you are trying to achieve?
Date and time currently look like this 7/7/2015 2:24:38 AM
 
 and need to be -7 hours not +7

so it should look like this... 7/6/2015 7:24:38 PM

and when you use this =A2-TIME(7,0,0) it removed the date and the time is the only thing left.

I still want the date included.
Nevermind, I just needed to format the date correctly using a custom date

m/d/yyyy h:mm:ss AM/PM
I just needed to do a custom format to recreate the date/time to look the same using this...

m/d/yyyy h:mm:ss AM/PM
It seems to be a formatting issue. Maybe your formula cells are formatted as Time. For example copy the formatting of cell A2 with format painter and apply it to the formula cell.

Have you looked at the file attached by ProfessorJimJam? It is giving you what you are trying to achieve.

Does this help?