How do I change SQL Server 2008 date format to UK (dd/mm/yyyy)?
Posted on 2009-03-29
Hi, I'm Classic ASP trained now using Visual Studio 2008, and having a problem understanding how to make SQL Server 2008 accept dates in the UK format - the default value or binding for a date field in my table is '12/31/1999' - when I try to change this in SQL Server to UK format I get a Validation error warning. The date I want to Insert is a string in the format "dd/mm/yyyy" which I convert to date before Inserting (pls see code snippet) - I continually get "The conversion of a varchar data type to a datetime data type resulted in an out-of-range value" error.
I have inserted <globalization culture="en-GB" uiCulture="en-GB" /> in the System.Web section of Webconfig and attach a code snippet for convenience.
Have spent many hours researching this on the internet without success. Please help me,