Got a strange one here.
the person next to me is having problems with dates on his PC. It is manifesting itself in a few ways, I will list them here. The same problems do not appear for me when i run the same code.
Just to confirm, his regional settings are set as English UK.
1) In excel, bringing data back from a SQL database, for a date held on the excel workbook. It finds the correct data, i.e. for that date, when you step through the code, just before it prints the date into excel, if you hover the mouse over the date it is in the correct dd/mm/yyyy format, and also if you debug.print it is in the correct format.
However when displayed in excel it has now changed to USA mm/dd/yyyy format.
2) He has created some imports in excel that he will import into a sql database. The data is all in dd/mm/yyyy format and correct in Excel. When he imports the data into sql, it switches the data into mm/dd/yyyy format.
If he makes the import file a csv it works ok.
3) Lastly, and possibly not connected but worth mentioning, there is a simple asp webpage, that entries are made into, after selecting a date via a calendar, and they are inserted into the same sql database. again when it inserts, it switches the date format round.
If I do this, there is no problem.
Does anyone have any ideas about what is happening here?
the person next to me is having problems with dates on his PC. It is manifesting itself in a few ways, I will list them here. The same problems do not appear for me when i run the same code.
Just to confirm, his regional settings are set as English UK.
1) In excel, bringing data back from a SQL database, for a date held on the excel workbook. It finds the correct data, i.e. for that date, when you step through the code, just before it prints the date into excel, if you hover the mouse over the date it is in the correct dd/mm/yyyy format, and also if you debug.print it is in the correct format.
However when displayed in excel it has now changed to USA mm/dd/yyyy format.
2) He has created some imports in excel that he will import into a sql database. The data is all in dd/mm/yyyy format and correct in Excel. When he imports the data into sql, it switches the data into mm/dd/yyyy format.
If he makes the import file a csv it works ok.
3) Lastly, and possibly not connected but worth mentioning, there is a simple asp webpage, that entries are made into, after selecting a date via a calendar, and they are inserted into the same sql database. again when it inserts, it switches the date format round.
If I do this, there is no problem.
Does anyone have any ideas about what is happening here?