Forum Discussion
mister19stick19
Oct 01, 2026Copper Contributor
Error converting YYYY-MM-DD values to date
Workbook from third party, I think derived from CSV.
Workbook has UK format dates.
One of the columns has a date as a string in year first hyphen separated format YYYY-MM-DD.
Importing the data into SQL and calling TRY_CONVERT( datetime, InputDate, 105 ) returns NULL.
Turns out it's expecting a middle endian date, YYYY-DD-MM.
Who thought this was a good idea?
There is no culture in the world uses this.
What is the reasoning for this and why can't YYYY-MM-DD be acknowledged as a universal format, that is culture independent.
1 Reply
- ViorelBrass Contributor
Maybe the question should be asked to those who provided the CSV and workbook.