Google-sheets – Date fields that refuse to be parsed/formatted

conditional formattingformulasgoogle sheetsgoogle-sheets-datesgoogle-sheets-import-csv

I have some very mysterious date fields in a huge (600 000 records) CSV file which absolutely refuses to behave.

They come up aligned left, and conditional formatting shows that they cannot be seen as dates for some reason, even though they are formatted the same as all the other dates — d/m/Y.

What's more, these same dates are the ones giving me trouble when importing users into WordPress using wp-import. In their user profiles, they show today's date. About half the dates are doing this.

Any light that could be shed on this would be much appreciated.

UPDATE: Here is a link to a sheet with a sample of date fields.

Best Answer

d/m/Y is an ambiguous date formatting.

It's very likely that this occurs because the spreadsheet regional setting used in the spreadsheet doesn't support d/m/Y as a date formatting. Please note that the screenshot included in the question shows column J values having a "day" value greater than 12, with exception of 11/01/2019 have the a white cell background instead of green.

NOTE: It's very likely that the other values aren't correctly parsed as the date they represents, i.e. 09/03/2014 is very likely that is parsed as September 3rd, 2014 instead of March 9th, 2014

One quick solution is to set the spreadsheet regional setting to one that supports d/m/Y before adding the values to the spreadsheet.

Related