This topic is locked

whats wrong with the dates

9/27/2006 12:28:48 AM
ASPRunnerPro General questions
customcode author

Hi, what am I doing wrong with the date values

Reeferwetdate is the database column name. I want it to increment 6 months

%>
<input type=button value="Update Reefer_Heater"

onclick="java script: var dt = new Date();

dt.setTime((new Date()).valueOf() + Number(180)10003600*24);

updateReeferwetdateDt(dt.getDate() + '-' + (dt.getMonth()+1) + '-' + dt.getFullYear());">



<%

Sergey Kornilov admin 9/27/2006

Do you see any errors? How do you know it doesn't work?
Use alert() function to see what date this code generates.

customcode author 9/27/2006

when I click the button it pops up an error message object expected line 77 char 1 code 0 but the following is on line 77. If I remove the date portion it will update the hours
if (GetRequestForm("editid")<>"" and GetRequestForm("todo")="edit") then

Sergey Kornilov admin 9/27/2006

Unfortunately I don't understand anything.
Use alert() function to print variables and see what goes wrong.