Link to home
Start Free TrialLog in
Avatar of garethtnash
garethtnashFlag for United Kingdom of Great Britain and Northern Ireland

asked on

SQL Date Input

Hello,

I'm using a shared SQL server.

I'm UK based

I have a form with a datepicker on it, and being in the UK want to display the date picked as dd/mm/yy or dd/mm/y

However when I try to do either an insert or an update on the database with a date greater than the 12th - 14/10/11 for instance -

I get --

"Microsoft OLE DB Provider for SQL Server error '80040e07'
The conversion of a nvarchar data type to a datetime data type resulted in an out-of-range value.
/direct/includes/product-update.asp, line 188"

I am asuming this is because the database is expecting the date input in the form of MM/DD/YYY and as there are not 14 months.....

So how do i work around this? I need my form to display UK format (dd/mm/yyy) the database needs MM/DD/YYYY?

I'm developing using ASP VBscript on a MS SQL 2008 database...

Insert & Update are Stored Procedures..

Thank you
ASKER CERTIFIED SOLUTION
Avatar of Lee
Lee
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of garethtnash

ASKER

Thank you both :)