shahsaurabhu
asked on
Problem in Date field
The question is littlebit tricky, in which i had developed a Web base application using ASP that run on IIS web server. The database is ORACLE on UNIX Platform. When i deploy the site on Windows NT running with IIS 5, it works fine. But the same i deploy on Windows 2000 server running IIS 5 the problem is coming.
In this, when i save the data through web browser, Particularly date field, it inserts the data by making mm(month) part to dd(datepart) and viseversa. This is the case for date and month less than 12. So what is the actaul problem and what is the solution?
Pl. help me.
In this, when i save the data through web browser, Particularly date field, it inserts the data by making mm(month) part to dd(datepart) and viseversa. This is the case for date and month less than 12. So what is the actaul problem and what is the solution?
Pl. help me.
So the only change was going from NT to Windows 2000? You could try setting the regional date setting on the Win2K to a d/M/y format. Or M/d/y, whichever. What does your Oracle expect? If you got a date out of it, how is it formatted?
Oracle is very picky about date formats, it have to be defined for the view.
So it's most likely your ASP which did it wrong, 'cause haven't changed the SQL in ASP, did you?
savalou's suggestion seems to be the solution
So it's most likely your ASP which did it wrong, 'cause haven't changed the SQL in ASP, did you?
savalou's suggestion seems to be the solution
I also seem to remember a chartodate or some-such function for oracle where you can also specify the date format, sort of like the following:
insert into mytable (mydate) values (chartodate('4/3/03', 'd/M/y'))
There is also a date-to-char function. I'd look in the oracle docs if that seems useful.
insert into mytable (mydate) values (chartodate('4/3/03', 'd/M/y'))
There is also a date-to-char function. I'd look in the oracle docs if that seems useful.
if the same script works on NT but not w2k, it's most likely not SQL
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
PAQ No refund
Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
liddler
EE Cleanup Volunteer
I will leave a recommendation in the Cleanup topic area that this question is:
PAQ No refund
Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
liddler
EE Cleanup Volunteer
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.