Hi All,
I've been having a nightmare debugging some code that was converting a date it copied from a workbook into American format (mm/dd/yyyy). Over the past couple of days I've tried everything I can think of/find on Google to stop 03/02/2014 from converting to 02/03/2014. Today I have realised that it's not anything in my code or how I read the date, but the fact that when my code opens the workbook the date is automatically converted to the wrong format.
I open a CSV file selected in a form like this:
Workbooks.Open Me.txtStatsPath
If I open the CSV file myself through explorer the date in B3 displays as 03/02/2013
However, when the line above opens the workbook the date is displayed as 02/03/2013. When I check the cell formatting it tells me it is displayed in UK format (dd/mm/yyyy) but it clearly isn't
The date is an integral part of what I am doing with this data, so this is a big problem. I could make code to build a string reformatting the date value whenever the first 2 characters are 12 or under, but before I mess about doing that I wonder if anyone can explain this and give a more elegant solution?
Cheers
Duane
Bookmarks