Howdy all,
Trying to insert a date/time into mySQL, now according to the documents, you do have to format the time.
However also according to the documents, now() or date()
should both work.
however this SQL
will result with
and using Date() will just insert it as 2001-00-01
any ideas where i'm straying from the proper SQL?
Thank you
"Never underestimate the power of determination"
Stuart
Trying to insert a date/time into mySQL, now according to the documents, you do have to format the time.
However also according to the documents, now() or date()
should both work.
however this SQL
Code:
SQLstmt = "Insert into tblIssue(fldDept,fldDevice,fldStatus,fldIssue,fldDate)"
SQLstmt = SQLstmt & "VALUES(" & replace(request("txtDevice"),"-",",")
SQLstmt = SQLstmt & ",'" & "Open" & "'"
SQLstmt = SQLstmt & ",'" & replace(request("txtDescription"),"'","''") & "'"
SQLstmt = SQLstmt & "," & NOW()
SQLstmt = SQLstmt & ")"
will result with
Code:
[MySQL][ODBC 3.51 Driver][mysqld-4.0.16-nt]You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '4:51:57 PM)' at line 1
and using Date() will just insert it as 2001-00-01
any ideas where i'm straying from the proper SQL?
Thank you
"Never underestimate the power of determination"
Stuart