PDA

View Full Version : Date problem in ASP with SQL!!!!


NinjaTurtle
10-14-2002, 03:15 AM
dear,

i found date problem in ASP with SQL!!!!

Last time i dont know y my server date format change to dd/MMM/yyyy. and now i reinstall the whole Server OS, it change to normal, dd/mm/yyyy, but all my ASP program theat retreive date from database will get errors, i change back my ASP coding to dd/mm/yyyy but still not working, when the real day of the date(server date) is less than 12 then it will change to mm/dd/yyyy and what i want is dd/mm/yyyy. but if the server date is 14, Oct 2002 then i will get error =>

Error Type:
Microsoft OLE DB Provider for SQL Server (0x80040E07)
The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.


any function or solution that can solve even the date setting have been changed to any format and i still can get the correct date!!!

glenngv
10-14-2002, 03:29 AM
change the desired date format in the Regional Settings properties, Date tab from the Control Panel.

NinjaTurtle
10-14-2002, 03:52 AM
its not worable, i tried b4.

Leeus
11-01-2002, 11:02 PM
Use the <% session.LCID = 'valuehere' %> string, full listings of LCID's on MSDN but UK is 2057, US 1033

Mhtml
11-01-2002, 11:16 PM
Aren't you supposed to have # infront of times and dates in sql?

whammy
11-02-2002, 01:10 AM
In Access, yes. Not in SQL Server... that uses '.

Mhtml
11-02-2002, 02:02 AM
Aaahhh, I see.