I have a sheet that is receiving data from another application but the date format comes like this on the cell: 2021-04-09 12:57:51 -0300 and i need this date to be readable by google sheets and data studio as a date format, only with year, month, day. How can I make it using conditions?
I've tried many conditions but no one seems to work.
CodePudding user response:
Use this formula
=ArrayFormula(IF ( A2:A="",,DATE(
REGEXEXTRACT(A2:A, "(. ?)-"),
REGEXEXTRACT(A2:A, "-(..?) "),
REGEXEXTRACT(A2:A, "-(. ?)-"))))
CodePudding user response:
try:
=INDEX(SPLIT(A1:A10; " ");;1)