Search code examples
dategoogle-sheets-formulastring-formattingspreadsheetgoogle-query-language

How can I format a string sheet to date with Query


I have a col on googlesheet, that I need convert to date time with query function.

Column A Column B
nome1 2022-11-17T13:41:47.431Z
name2 2022-11-17T13:41:47.431Z
Column A Column B
nome1 2022-11-17 13:41:47
name2 2022-11-17 13:41:47

Solution

  • try:

    =INDEX(QUERY({A1:A, TEXT(REGEXREPLACE(B1:B,
     "[TZ]", " "), "e-mm-dd hh:mm:ss")}))
    

    enter image description here