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
Microsoft SQL Server 2008VB ScriptASP

Avatar of undefined
Last Comment
garethtnash
ASKER CERTIFIED SOLUTION
Avatar of Lee
Lee
Flag of United Kingdom of Great Britain and Northern Ireland image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
SOLUTION
Avatar of pateljitu
pateljitu
Flag of Canada image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
Avatar of garethtnash
garethtnash
Flag of United Kingdom of Great Britain and Northern Ireland image

ASKER

Thank you both :)
ASP
ASP

Active Server Pages (ASP) is Microsoft’s first server-side engine for dynamic web pages. ASP’s support of the Component Object Model (COM) enables it to access and use compiled libraries such as DLLs. It has been superseded by ASP.NET, but will be supported by Internet Information Services (IIS) through at least 2022.

82K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo