Windows Server 2000/2003 Thread, SQL Server Date field issues in Technical; I've got an old SQL 2000 Server which I want to move to a new server, running SQL Express 2005. ...
25th October 2010, 12:25 PM #1
SQL Server Date field issues
I've got an old SQL 2000 Server which I want to move to a new server, running SQL Express 2005. I can restore the database to the new server no problems, but all of the date fields in my new database have changed.
I.e In the old DB, I had a lot of datetime fields with a size of 8 (i.e 01/12/2010) as all that is required is the actual date. Now all of these fields appear as 01/12/2010 00:00:00 and this screws up all of my queries. The size is still showing in the new DB as 8, but its obviously got the time in there as well.
Am I doing something wrong here, I don't recoding every date reference to cope with this!
25th October 2010, 01:48 PM #2
Ahhh I've found what was going wrong. The login in the new DB had defaulted to the British English language, on the original the login as English (as in US English) so the queries were coded to suit the US style of reverse dates.
Setting the Login to English and the queries are working again. Simple fix but an easy one to miss!
Thanks for the info though - I was hoping I wouldn't have to recode or redesign the tables!
By localzuk in forum MIS Systems
Last Post: 21st June 2010, 11:46 AM
By leonard.powers in forum MIS Systems
Last Post: 1st October 2009, 01:58 PM
By djones in forum Scripts
Last Post: 4th August 2009, 10:51 AM
By Pyroman in forum How do you do....it?
Last Post: 2nd May 2008, 04:19 PM
By link470 in forum Windows
Last Post: 17th December 2007, 06:15 PM
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)