Convert String to Real Date Time Value in Google Sheets

formulasgoogle sheetsgoogle-sheets-arrayformulagoogle-sheets-datesregex

Here is my current input:

14.05.20
12.37.01

And yes, as it shows, there is a line break in the cell…

Here is example sheet: https://docs.google.com/spreadsheets/d/14nLk3nVaeknb9T1JS1EIdH5bqkENuj4OgxF0mPCrzmU/edit#gid=0

How could this be turned into an actual date and time?
I would love it if it could handle the whole column down

Best Answer

Edit

In your Google thread you mention:

Would really like to be able to convert this in one formula/step.
...
I would love if it if could handle the whole column down.

In this case, you can use the following formula

=ArrayFormula(IFERROR(  
     (REGEXREPLACE(REGEXEXTRACT(A2:A,"(^\d+\.\d+\.\d+)"),"\.","\/") 
     &" "
     &REGEXREPLACE(REGEXEXTRACT(A2:A,"(\d+\.\d+\.\d+)$"),"\.",":"))
                          *1))

Convert stings in a column to Date time, using an arrayformula


Original answer:

The raw, unformatted value will be returned.
Format the result as Date time from the Format menu.

Convert string to real date time value

Functions used: