1

I'm trying to extract the time and date from the following cell in google sheets: 2022-02-21T05:14:05.556Z

I've managed to extract the time with the formula: =TIMEVALUE(REGEXEXTRACT(D2,"\d+:\d+:\d+"))

But I cannot find a formula to also get the correct date out of it.

Anyone has an idea how to do it? I'd preferably extract both date & time at the same time!

Cheers, Hayo

player0
  • 124,011
  • 12
  • 67
  • 124
Hayo
  • 13
  • 2
  • Does this answer your question? [How to conditionally change a date based on a time? Time zone differences?](https://stackoverflow.com/questions/71368583/how-to-conditionally-change-a-date-based-on-a-time-time-zone-differences) – Mike Steelson Mar 08 '22 at 14:35

1 Answers1

0

try:

=SPLIT(D2; "TZ")

for array:

enter image description here

sidenote: columns are formatted as Date and Time

for forced formatting use:

enter image description here

player0
  • 124,011
  • 12
  • 67
  • 124