To properly put the date and time into a MySQL date field, you need to put it into the format of:

yyyy-mm-dd hh:mm:ss

Here is some code to do this in classic ASP for input into a MySQL table:

Dim testdate, testmonth, testday, ISODate
testdate = Request.Form("frmField5")
testmonth = Right(Month(testdate),2)
testday = Right(Day(testdate),2)
ISODate = Year(testdate) & "-" & testmonth & "-" & testday & " " & hour(testdate) & ":" & minute(testdate) & ":" & second(testdate)

The ISODate variable is in the correct format to insert in a MySQL UPDATE or INSERT SQL statement. Below is an example SQL string to UPDATE a date field in a MySQL table:

UPDATE myTable SET thisdate = 'ISODate' WHERE myID = 'thisID'

VN:F [1.9.17_1161]
Rating: 7.3/10 (6 votes cast)
VN:F [1.9.17_1161]
Rating: +1 (from 1 vote)
Proper Date Time format for MySQL from classic ASP code, 7.3 out of 10 based on 6 ratings
 
Take a piece of the Web from WebPaws.com: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Facebook
  • LinkedIn
  • TwitThis
  • MySpace
  • Google Bookmarks
  • Webnews
  • Digg
  • del.icio.us
  • StumbleUpon
  • eKudos
  • email
  • Fleck
  • Hype
  • MisterWong
  • Print
  • Technorati
  • YahooMyWeb