I had trouble trying to use a date parameter in a SQL statement using JScript and ADO. Here is the answer:
var connection = new ActiveXObject("ADODB.Connection");
connection.ConnectionString = "Provider=...";
connection.Open();
var command = new ActiveXObject("ADODB.Command");
command.ActiveConnection = connection;
command.CommandText = "INSERT INTO ... VALUES (..., ?, ...)";
command.Parameters.Item(0).value = messageTime.getVarDate();