What datetime format is this 2022-04-05T12:39:34.579775Z and how to convert to US date time format but in GMT timezone with a formula in Google Sheets when it appears in A1 and I want to return correct format in b1?
CodePudding user response:
try:
=SUM(SPLIT(A1, "TZ"))
so for example, if you reside in Pacific Time Zone you are in UTC-7
and with milliseconds:
=TEXT(SUM(SPLIT(A1, "TZ"), "-7:00"), "m/d/e h:mm:ss.000")
or with extra precision:
=TEXT(SUM(SPLIT(A1, "TZ"), "-7:00"), "m/d/e h:mm:ss")®EXEXTRACT(A1, "(\.\d )")
and don't forget to account for the Daylight Saving system!
CodePudding user response:
You can try
date('Y-m-d h:i:s', strtotime($yourDate));