Forums

ASP

This topic is locked

MySQL Date formats and such

Posted 02 Dec 2005 19:48:10
1
has voted
02 Dec 2005 19:48:10 Neal T posted:
Background info:
Not a web designer or programmer from definition. I have gotten things to work by asking questions and playing with the *answers* I have found on the web.

Current Situation:
I am trying to write a submittal page. I have it working, and HAD it working before. In MySQL, I have a column name varDate which will hold the date values. According to places on the web I have come to the understanding that MySQL has their dates in the DB as YYYY-MM-DD In Asp, the default format is MM-DD-YYYY.

How do I make ASP's version convert to a MySQL format?

Currently, my code is:


<input name="txtdate" type="text" value="<% datesub() %>" size="10">

In my Sub call, the code is:

sub datesub()
If request.form("frmDate" = "" then
response.write date()
else
response.write txtdate
end if
end sub

Thanks for any help!

G3

Reply to this topic