Hi,
I have a question,i need to do a task which is when client enter the topupdate and topupamount,the expected expired date will appear on the table,can anyone help me since i have spend 2 weeks to do this.i had try dateAdd function but still cannot. Here are my sample coding
if Request.QueryString("S_MobileNo") <> EMPTY then
recordSet("MobileNo") = Request.QueryString("S_MobileNo")
end if
if Request.QueryString("S_ServiceType") <> EMPTY then
recordSet("ServiceType") = Request.QueryString("S_SeviceType")
end if
if Request.QueryString("S_State") <> EMPTY then
recordSet("State") = Request.QueryString("S_State")
end if
if Request.QueryString("S_Location") <> EMPTY then
recordSet("Description") = Request.QueryString("S_Location")
end if
if Request.QueryString("S_TopupDate") <> EMPTY then
if IsDate(Request.QueryString("S_TopupDate")) then
DateStr = Day(Request.QueryString("S_TopupDate")) & "/" & Month(Request.QueryString("S_TopupDate")) & "/" & Year(Request.QueryString("S_TopupDate"))
recordSet("TopupDate") = DateStr
end if
end if
if Request.QueryString("S_TopupAmount") <> EMPTY then
if isnumeric(Request.QueryString("S_TopupAmount")) then
recordSet("TopupAmount") = Request.QueryString("S_TopupAmount")
end if
end if
if Request.QueryString("S_ExpiredDate") <> EMPTY then
d_added=DateAdd("d",TopupAmount,TopupDate) 'ExpiredDate = TopupDate + TopupAmount'
document.write("d_added")
end if
if Request.QueryString("S_owner") <> EMPTY then
recordSet("owner") = Request.QueryString("S_owner")
end if
if Request.QueryString("S_remark") <> EMPTY then
recordSet("remark") = Request.QueryString("S_remark")
end if
recordSet.Update
connectionToDatabase.Close
Set connectionToDatabase=Nothing
Plz help Me!!Tq