Weird Happenings! (Full Version)

All Forums >> [Web Development] >> ASP and Database



Message


Cookie -> Weird Happenings! (2/7/2002 6:36:43)

I am currently usinng a form called edit.asp that I can edit the crrent data, which in turn submits to update.asp to update the data.

My problems seem to lie in the two date fields (Start Date & Finish Date). I have two problems with this:

Problem 1)When I fill the form out, if you leave either of the fields blank it will automatically post the date 01/01/1900.

Problem 2)When you input the date in the format dd/mm/yy and post it to update.asp you get the following message:

Description: [Microsoft][ODBC SQL Server Driver][SQL Server]The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.
Number: -2147217913 (0x80040E07)
Source: Microsoft OLE DB Provider for ODBC Drivers

One or more form fields were empty. You should provide default values for all form fields that are used in the query.

Yet if you post it in the format mm/dd/yy it will update it. BUT when you review the list , it has inputted it in the format dd/mm/yy!

Any ideas? PLEASE HELP!

Thanks

Dave





Spooky -> RE: Weird Happenings! (2/7/2002 7:26:11)

You may need to set the script locale using :

<%Session.LCID = 1033%>

That will change the time formats to US and (hopefully!) trick the input into the right format.

§þððk¥
Database / DRW Q & A
VP-ASP Shopping cart
Spooky Login




Cookie -> RE: Weird Happenings! (2/7/2002 8:20:04)

Thanks Spooky,
What if I want it in the UK format?

Thanks





Spooky -> RE: Weird Happenings! (2/7/2002 9:04:31)

http://www.4guysfromrolla.com/webtech/031401-1.2.shtml :)

§þððk¥
Database / DRW Q & A
VP-ASP Shopping cart
Spooky Login




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.046875