I have an excel from where I am bulk importing data to SQL server through .Net code (Dataset.WriteToServer method). Now, my excel has dates in m/d/yyyy format, e.g. 9/21/2021. The destination SQL Server column is varchar and I would prefer not to have to change it in this release. When we run this in one app server, its importing as '9/21/2019' in SQL Server, which I want. However, in another app server, its being imported as '21/9/2021' for the same excel file. This is causing some functionalities to fail in the second server
We checked the System date and time formats in the two servers and in the second server (where the problem occurs), it was d/m/yyyy. We are changing that to m/d/yyyy. Now I have 2 questions,
- Any other changes required at Windows or SQL Server level to do this without code change?
- Do we need to reboot the system/restart IIS or App pool for this change to take effect? Thanks in advance