View Full Version : DateTime US Default


Phil_b
01-17-2006, 01:34 AM
Hi Guys,

Im writing a stored procedure with a couple of date inputs. It returns rows with dates that are equal to those inputs. My problem is that if I put a date such as:

15/12/2005

it overflows as it interprets it in US format (eg month 15...). If I add:

12/15/2005

everything works fine and it returns all records with a date of 15/12/2005.


I have looked into change my SQL Server login languages to English British to no avail. Does anyone have any solution to this problem?

Thanks in advance.

Phil

pdx_man
01-17-2006, 01:36 PM
I believe it goes off of your system settings. Look in Control Panel ... Regional Settings and tell me how that is set.

Phil_b
01-18-2006, 06:11 AM
yeah I did that and to no avail... what I then did was change my own computer time to US and everything is 'in sync' and works fine. This is only a temp solution so I can continue working on things.

Perhaps I need to reboot the server for the regional settings to change? Not sure but it still keeps with US regardless of ammendments.

Thanks for your help.

Phil

SQL_Hell
01-20-2006, 02:28 AM
Hi there,

Provided its ok that you change the language on the server and it's not going to screw anything else up.

run this

sp_configure 'default language',23

followed by this

reconfigure with override

You may have to restart the service for it to take effect