Creative Jar Blog RSS Feed

SQL Server Dates

December 19, 2008 11:03 by tim

Dates are traditionally a nightmare. Is it US or English? 2 digit years or 4 digit?

To get dates into SqlServer isn't that tramuatic.  Give it to the server in ISO format (yyyy-MM-dd HH:mm:ss) and all is hunky dory.  Or so I thought!!

We had an issue on a server that one of our client's maintain that has it's local set to "English (United States)" and it was giving us all sorts of date problems being it was in a differnt locale to our application.  Turns out there's a connection string property, which I'd never heard of, which can force the locale of your connection to something appropriate

language=British

sorted it out for us anyway.  Now, all locale specific information is set to the same as out app :¬)


Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:
Categories: Technical
Actions: E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed

Related posts

Calendar

March 2010
SuMoTuWeThFrSa
28123456
78910111213
14151617181920
21222324252627
28293031123
45678910