I wonder if someone can advice.
I’m running a query which seems to run fine on the live server but gives an overflow error when converting a string in the from ‘2013-03-31 00:00:00’ to a datetime. I found out the reason is its seeing it in the form year-day-month so a month of 31 is obviously wrong.
WHERE W.DateForInvoicing BETWEEN CAST(CAST(@FinancialYear As nvarchar(5)) + '-04-01 00:00:00.000' As datetime)
AND CAST(CAST((@FinancialYear + 1) As nvarchar(5)) + '-03-31 23:59:59.000' As datetime)
I'm using Windows 2003 Server
I can’t however see the difference between the live server and my local version. The regional and language settings are the same in the control panel as on live server, the Server Collation is the same on the SQL Servers Latin1_General_CI_AS, and in Advanced on server properties the Advanced > Default language is English – the same as the live server. The only difference I can see is the SQL server on the live is standard whereas I’m using the developer edition SQL 2005.
I'm a web developer, so actually setting up servers it not my area of expertise, and I'm a bit stumped. I can't find any other regional/country settings
can anyone help
Andy
It doesn’t seem to be a report writer issue as if I run the same code as a query in SQL Management studio I get the same error, so it must be something to do with SQL server
Frankly I’m a bit stumped, do you have any ideas?
Andy
I’m running a query which seems to run fine on the live server but gives an overflow error when converting a string in the from ‘2013-03-31 00:00:00’ to a datetime. I found out the reason is its seeing it in the form year-day-month so a month of 31 is obviously wrong.
WHERE W.DateForInvoicing BETWEEN CAST(CAST(@FinancialYear As nvarchar(5)) + '-04-01 00:00:00.000' As datetime)
AND CAST(CAST((@FinancialYear + 1) As nvarchar(5)) + '-03-31 23:59:59.000' As datetime)
I'm using Windows 2003 Server
I can’t however see the difference between the live server and my local version. The regional and language settings are the same in the control panel as on live server, the Server Collation is the same on the SQL Servers Latin1_General_CI_AS, and in Advanced on server properties the Advanced > Default language is English – the same as the live server. The only difference I can see is the SQL server on the live is standard whereas I’m using the developer edition SQL 2005.
I'm a web developer, so actually setting up servers it not my area of expertise, and I'm a bit stumped. I can't find any other regional/country settings
can anyone help
Andy
It doesn’t seem to be a report writer issue as if I run the same code as a query in SQL Management studio I get the same error, so it must be something to do with SQL server
Frankly I’m a bit stumped, do you have any ideas?
Andy