0

I have a file from amazon and in that they are providing datetime in UTC format.Below is the example of that :

2020-06-15T23:59:56+00:00

Now I want convert this datetime into PDT format in Excel using formula. Is it possible to do it?

BigBen
  • 46,229
  • 7
  • 24
  • 40

2 Answers2

3

You could use something like below. It works in 3 parts :

  1. Substitute "T" from the value with a space.
  2. Take only left part of value for 19 characters that make up the relevant date and time
  3. Deduct 7 hours using 7/24 from the time as PDT = UTC - 7 hours

=LEFT(SUBSTITUTE(A2,"T"," "),19) - 7/24

enter image description here

VTi
  • 1,309
  • 6
  • 14
2

Use SUBSTITUTE, and then subtract 7/24 to subtract 7 hours.

=SUBSTITUTE(SUBSTITUTE(A1,"T"," "),"+00:00","")-7/24

enter image description here

BigBen
  • 46,229
  • 7
  • 24
  • 40