ISO-8601 String to Date in Google Sheets cell

前端 未结 3 1574
庸人自扰
庸人自扰 2020-12-24 11:46

I have a bunch of ISO-8601 formatted strings in a column of my sheet. How can I get google sheets to treat them as Dates so I can do math on them (difference in minutes bet

3条回答
  •  滥情空心
    2020-12-24 12:17

    Try this

    =CONCATENATE(TEXT(INDEX(SPLIT(SUBSTITUTE(A1,"Z",""),"T"),1),"yyyy-mm-dd")," ",TEXT(INDEX(SPLIT(SUBSTITUTE(A1,"Z",""),"T"),2),"hh:mm:ss"))
    

    Where A1 can be a cell with ISO-8601 formatted string or the string itself.

提交回复
热议问题