Harsh kumar
Harsh kumar

Reputation: 47

how to convert time zone of a datetime in google sheets

I have a column, in which datetime in text format "2022-04-12 07:09:10 UTC". I want to change this into IST time zone and convert it into date format only

Upvotes: 0

Views: 1596

Answers (1)

tomf
tomf

Reputation: 535

You'll need to extract the date and time then add on 5h30m. From there you can either wrap it with INT or format the column to show just the date. For the one below, I used INT, which will strip the time after it is converted.

=ARRAYFORMULA(
  IF(ISBLANK(A2:A),,
   REGEXREPLACE(A2:A,"UTC","")+
   TIME(5,30,0)))

Upvotes: 2

Related Questions