Richard Howells' Blog

SQL Server, DateTime values and string formats for Dates

I've been working with a group who inherited some bad code when the software house supplying them went bust.  When the application added or updated data in SQL Server sometimes date values were accepted in US format and sometimes in UK format.  On the Test server it was one way and on the Live it was the other.

It's never good when live and test have different configurations but applications often need to work properly regardless of details like date format configurations.  The solution is to use parameters properly.  I wrote about it here. http://www.dynamisys.co.uk/ForumsBlogs/Forums/tabid/299/forumid/16/scope/threads/Default.aspx

Posting Archive
Copyright 2002-15 by Dynamisys Ltd