Can anyone provide me with some guidance on inserting a
record into a table, with a column for the current date/time? (e.g.
the date/time the record is created). This is an ASP page, using DW
CS3.
1) I create a variable to capture the current date/time:
var ContactUsDate = new Date();
Response.Write(ContactUsDate);
the response.write generates : Fri Mar 6 23:47:00 EST 2009
2) I'm using the 'record insert' functions, which generates
the following code:
MM_editCmd.Parameters.Append(MM_editCmd.CreateParameter("param5",
135, 1, -1, (ContactUsDate))); // adDBTimeStamp
3) and I get the following error:
ADODB.Command error '800a0d5d'
Application uses a value of the wrong type for the current
operation.
/ContactUs.asp, line 70
I've tried several variations on formatting the date, but to
no avail. The only way I've been able to get it to work is to
create a hidden form field, and hard code it's value (e.g.
03/06/2009). I want to have a date/time stamp to help with sorting
on other pages within the site.
Thanks for any help!