Hi,
I am struggling with an MS SQL 2005 Express issue. A query like the one below works perfect when Windows Regional Options (control panel) is set to English (United States), but it fails when set to Italian (and maybe other languages).
UPDATE MyTable SET StartDate='2009-07-14 12:05:30' WHERE ID=7
I tried also many different date-time formats such as ISO 8601:
yyyy-MM-ddTHH:mm:ss
(see also: http://www.karaszi.com/SQLServer/info_datetime.asp)
None of these formats work except for yyyyMMdd, but then I loose the time which is not acceptable.
Also executing this query first makes no difference:
SET LANGUAGE us_english
PS: I execute the query from a .Net program, but SQL Server Management Studio gives the same result: it cannot convert the string into a data-time. As soon as the settings are changed back to US English it works again.
How do I make this query work with other language settings?