Ahooi

Dates … don’t you HATE dates in databases / SQL?

Ok so today I had to move the odd million records into a SQL database. A couple of thousand jumped across happily and then it all went wrong! The error message complained of wrong data types, but my dates seemed perfectly happy and the fact that they came from a date field in another database gave me confidence that that is not the case. 

It turns out that SQLServer installs itself with US date systems, which is fine if you live in Yankland, but if you sit on freezing island called the UK then it causes headaches…

So to fix it I ran the following command:

sp_configure 'default language'
 Which told me for sure I am configured as a Yank seeing the results came in as zero 0, the code for them Yanks… ok to change this you simlpy run the following:
 sp_configure 'default language', 1
   reconfigure with override
Which  sets you up for the UK. If you need the codes for other countries - Google is your friend!
Hope it helps someone - I know I will probably refer back to this page soon enough!

To Tumblr, Love PixelUnion