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.QuerySt ring("S_MobileN o") <> EMPTY then
recordSet("Mobi leNo") = Request.QuerySt ring("S_MobileN o")
end if
if Request.QuerySt ring("S_Service Type") <> EMPTY then
recordSet("Serv iceType") = Request.QuerySt ring("S_SeviceT ype")
end if
if Request.QuerySt ring("S_State") <> EMPTY then
recordSet("Stat e") = Request.QuerySt ring("S_State")
end if
if Request.QuerySt ring("S_Locatio n") <> EMPTY then
recordSet("Desc ription") = Request.QuerySt ring("S_Locatio n")
end if
if Request.QuerySt ring("S_TopupDa te") <> EMPTY then
if IsDate(Request. QueryString("S_ TopupDate")) then
DateStr = Day(Request.Que ryString("S_Top upDate")) & "/" & Month(Request.Q ueryString("S_T opupDate")) & "/" & Year(Request.Qu eryString("S_To pupDate"))
recordSet("Topu pDate") = DateStr
end if
end if
if Request.QuerySt ring("S_TopupAm ount") <> EMPTY then
if isnumeric(Reque st.QueryString( "S_TopupAmount" )) then
recordSet("Topu pAmount") = Request.QuerySt ring("S_TopupAm ount")
end if
end if
if Request.QuerySt ring("S_Expired Date") <> EMPTY then
d_added=DateAdd ("d",TopupAmoun t,TopupDate) 'ExpiredDate = TopupDate + TopupAmount'
document.write( "d_added")
end if
if Request.QuerySt ring("S_owner") <> EMPTY then
recordSet("owne r") = Request.QuerySt ring("S_owner")
end if
if Request.QuerySt ring("S_remark" ) <> EMPTY then
recordSet("rema rk") = Request.QuerySt ring("S_remark" )
end if
recordSet.Updat e
connectionToDat abase.Close
Set connectionToDat abase=Nothing
Plz help Me!!Tq
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.QuerySt ring("S_MobileN o") <> EMPTY then
recordSet("Mobi leNo") = Request.QuerySt ring("S_MobileN o")
end if
if Request.QuerySt ring("S_Service Type") <> EMPTY then
recordSet("Serv iceType") = Request.QuerySt ring("S_SeviceT ype")
end if
if Request.QuerySt ring("S_State") <> EMPTY then
recordSet("Stat e") = Request.QuerySt ring("S_State")
end if
if Request.QuerySt ring("S_Locatio n") <> EMPTY then
recordSet("Desc ription") = Request.QuerySt ring("S_Locatio n")
end if
if Request.QuerySt ring("S_TopupDa te") <> EMPTY then
if IsDate(Request. QueryString("S_ TopupDate")) then
DateStr = Day(Request.Que ryString("S_Top upDate")) & "/" & Month(Request.Q ueryString("S_T opupDate")) & "/" & Year(Request.Qu eryString("S_To pupDate"))
recordSet("Topu pDate") = DateStr
end if
end if
if Request.QuerySt ring("S_TopupAm ount") <> EMPTY then
if isnumeric(Reque st.QueryString( "S_TopupAmount" )) then
recordSet("Topu pAmount") = Request.QuerySt ring("S_TopupAm ount")
end if
end if
if Request.QuerySt ring("S_Expired Date") <> EMPTY then
d_added=DateAdd ("d",TopupAmoun t,TopupDate) 'ExpiredDate = TopupDate + TopupAmount'
document.write( "d_added")
end if
if Request.QuerySt ring("S_owner") <> EMPTY then
recordSet("owne r") = Request.QuerySt ring("S_owner")
end if
if Request.QuerySt ring("S_remark" ) <> EMPTY then
recordSet("rema rk") = Request.QuerySt ring("S_remark" )
end if
recordSet.Updat e
connectionToDat abase.Close
Set connectionToDat abase=Nothing
Plz help Me!!Tq
Comment