>My code does not use the XML serializer. And I cannot change the code - now - just for this case. So, I will have to find a solution still.
>Thank you.
Do you have access to the code that is doing the serialization? If yes, would you share so we can update.
If you have to live with that, there is a problem, consider:
01/02/2019
How would that be interpreted? It is Jan 2 in USA and Feb 1 in Europe. Assuming, in such case you would favor US settings (could be instead server default), I have created a demo code for you (SQL Server 2012 and later):
https://dbfiddle.uk/?rdbms=sqlserver_2017&fiddle=dda4d99a3924f79400ee650a0f822ae4and this is shorter form of that:
update @sample
set myDate =
Isnull( Try_Parse(dateStr as datetime using 'en-US'),
Isnull( Try_Parse(dateStr as datetime using 'en-GB'),
Try_Convert(dateTime, dateStr)));