Google-sheets – Google Sheets can’t understand timestamp format containing timezone information

google sheetstime zone

GitHub API returns timestamps like so 2018-10-03T10:30:51.444Z which as a programmer is not unusual. But when I put this into a Google sheet cell, it refuses all my attempts to get it recognised as a valid date so I can change the display format (e.g. have it shown in user's local time in a more human-friendly format).

Google is normally good at auto-detecting dates and I've no idea how to force it to – how can I do this ideally without having to manipulate the original string or using multiple cells?

Best Answer

Google Sheets date handling doesn't include a way to directly recognize date-time that include time zones, but JavaScript does it.

You could create a script to return a value that Google Sheets could recognize as a date. I.E. you could create a custom function that use a cell with a date-time string and returns a date object.

Related