Google-sheets – Google Sheets interpreting dates from CSV in a weird way

csvgoogle sheetsgoogle-sheets-datesgoogle-sheets-import-csv

I'm opening a csv report in Google Sheets. The Google Drive preview shows the dates like this:

google drive csv preview

When I open this file in Google Sheets the dates now look like this:

google sheets view of dates

And if I try and convert the date to int and then date it works for some but not all:

google sheets trying to convert to proper dates

Any idea how I can extract just the date from these cells?

Best Answer

Ok I've worked it out. Google Sheets imports the date cell as text and then interprets that cell as a date. The Locale is set as UK so it can't handle the US format date. I had change the spreadsheet Locale to US, use the =TO_DATE(INT(A2)) formula and then create a custom format on that column to show the date in UK format.