mseager
mseager

Reputation: 11

How to convert datetime format 2021-08-17T22:42:00.000Z to Date Format YYYY-MM-DD in Google Sheets

I have a script inputting dates in Date/Time format in my Google Sheet as a string as follows:

2021-08-17T22:42:00.000Z

I need to do some date calculations on this column and need the date in format YYYY-MM-DD without the Time information. Is there a way to convert the above string to date?

Thanks in advance for the help!!

Upvotes: 0

Views: 2375

Answers (2)

player0
player0

Reputation: 1

use:

=INDEX(SPLIT(A1:A, "T")*1,,1)

Upvotes: 0

Mike Steelson
Mike Steelson

Reputation: 15328

Try

=left(A1,10)*1

and then apply the format you wish.

Upvotes: 1

Related Questions