I am using MS SQL 2000, VS2008, MVC and C #.
I am trying to insert and update some data using stored procedures. Some columns are of type datetime. The regional settings on the server and on the client are set to Dutch (Belgium). This means that the default date format is dd / mm / yyyy.
When I try to insert or update a date, for example. 03/28/2009, I get the following errors:
Insert: Error converting nvarchar to datetime data type
Update: Converting char data type to datetime data type results in datetime time out of range
When I try to specify the date 01/03/2009, I get no errors, but the date is saved as 03/01/2009, which is the date format in the USA. This is typical behavior for problems with regional settings. But both are installed in Dutch (Belgium).
Why does it save dates in US format?
What am I missing here?
Thanks!
Stein
source share