Search code examples
regexdatetimegoogle-sheetsgoogle-sheets-formulaifttt

How to use REGEXEXTRACT for day and time?


I am using a third-party app that allows me to log in my day, time and location at the push of a button, on a google sheet.

enter image description here
(source: imggmi.com)

While the app catches these three elements (day, time, and location), I can only see day and location because of the formula that is being used.

enter image description here
(source: imggmi.com)

Is there a way to modify the formula to display both the date and time?


Solution

  • =TO_DATE(DATEVALUE(REGEXEXTRACT("June 14, 2019 at 11:52AM", "\w+ \d{2}, \d{4}"))+
             TIMEVALUE(REGEXEXTRACT("June 14, 2019 at 11:52AM", "at (.*)")))
    

    0