dingir
asked on
Mysql/ASP populate forms with wrong dateformat
When the tableformat datetime are loaded into a form (..input type="text"..), it loads as "1/1/2007".
I checked within the mysql table, the dates are stored with the format "2007-01-01", which is the format I want.
The exactly same (ASP) script and form are showing the dates in correct format on my development computer.
The wrong format appear when running it on the customers webhosting.
A little wierd problem that I need some help with.
I've search and found some "conversion scripts" but this is hard to implement because I use sub routines for populating the forms, that does not take care if there are a date, text or integer. Shouldn't there be an easy solution to this? Like setting a codepage or like that??
I checked within the mysql table, the dates are stored with the format "2007-01-01", which is the format I want.
The exactly same (ASP) script and form are showing the dates in correct format on my development computer.
The wrong format appear when running it on the customers webhosting.
A little wierd problem that I need some help with.
I've search and found some "conversion scripts" but this is hard to implement because I use sub routines for populating the forms, that does not take care if there are a date, text or integer. Shouldn't there be an easy solution to this? Like setting a codepage or like that??
ASKER
morcalavin,
Thank's for answer!
You mean that manipulating the output is the only way to solve the problem?
If the answer is yes, I will past some code..
Thank's for answer!
You mean that manipulating the output is the only way to solve the problem?
If the answer is yes, I will past some code..
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Closed, 500 points refunded.
Vee_Mod
Community Support Moderator
Vee_Mod
Community Support Moderator
<%
response.write formatMyDate(Now())
function formatMyDate(myDate)
formatMyDate = Cstr(DatePart("yyyy",myDat
end function
%>