Arithmetic overflow error converting expression to data type datetime
I got this error when I tried to convert string to datetime in query.
This is Culture problem.
What culture is your webserver?
What culture is your ASP.NET application using?
What culture is your database?
This is due to an inconsistency in the language settings between the web server and SQL server (or SQL server user).
By default, SQL Server users are set to "us_english" as the default language. The result is that different date formats are being used and are therefore not recognized by the database.
There are several options to remedy this situation:
1. Change the SQL user's default language to match the language settings on the SQL server.To do this, open SQL enterprise manager and connect to your database server. Expand Security -> Logins and open the properties dialog for the user that you are using to connect to the database. On the main properties page, change the language to equal the same language that is set on your web server.
2. Modify your connection stringOn your SQL connection string, add a parameter of Language= and set it equal to the correct language. For example, Language=British. (www.prezzatech.com)