0

I have this time in excel 2019-08-04T06:48:45.000Z enter image description here

It is in GMT time, how do I convert it to +12 hours? So what I want is 2019-08-04T18:48:45.000Z.

That's an easier one(just have to change the hour) but I want to change the date too as will be required. E.G This:
2019-08-04T22:35:15.000Z
To This:
2019-08-05T10:35:15.000Z

So far I can convert the hh:mm:ss.sss part of the string 2019-08-04T06:48:45.000Z to decimal value 0.28 and then reformat that and it gives me 6:48:45 a.m. enter image description here

I still have to add 12 hours to this, I am thinking I will convert 12 hours to decimal and then add this. But how would I go about adding to the date/day part of the string?

possible related questions which I will look into:
Converting time from text to hours and minutes in Excel
24-hours time with 12-hour notation
Converting time string text to hours and minutes in Excel

dropbox file columns N:AJ are of Interest

2
  • Strictly speaking, the Z part in the date/time string means Zulu time, aka GMT. If you convert it to another time zone, it is no longer Z but GMT + 12
    – teylyn
    Commented Aug 6, 2019 at 23:49
  • tks but how do I do the conversion you speak of?
    – HattrickNZ
    Commented Aug 7, 2019 at 3:07

1 Answer 1

1

Use this formula that:


  1. Creates a true date/time: REPLACE(LEFT(A1,23),11,1," ")
  2. Adds 12 hours: +TIME(12,0,0)
  3. Then formats it back to the original format "yyyy-mm-dd\Thh:mm:ss.000\Z":

=TEXT(REPLACE(LEFT(A1,23),11,1," ")+TIME(12,0,0),"yyyy-mm-dd\Thh:mm:ss.000\Z")

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .