S
Simon
Hi there.
I have a form on which I have a date of expiry which is built from 3 select
fields to build the day, month and year, this all works OK and the data is
being built and added to the database no problem.
However, I want to validate this date to ensure it is in the future, the
following validation does not work, any ideas?
'get data from form
ExpiresDD = Request.Form("ExpiresDDin")
ExpiresMM = Request.Form("ExpiresMMin")
ExpiresYY = Request.Form("ExpiresYYin")
'build the date
Expires = ExpiresDD & "/" & ExpiresMM & "/" & ExpiresYY
'validate for in the future
if Expires <= Date then
errorSameDate = "True"
errorTrap = "True"
end if
I have also tried isDate(Expires) to check if todays date, as in, but no
luck again, obvs submitting todays date!
if isDate(Expires) then
errorSameDate = "True"
errorTrap = "True"
end if
Hope someone can help.
Cheers
Simon
I have a form on which I have a date of expiry which is built from 3 select
fields to build the day, month and year, this all works OK and the data is
being built and added to the database no problem.
However, I want to validate this date to ensure it is in the future, the
following validation does not work, any ideas?
'get data from form
ExpiresDD = Request.Form("ExpiresDDin")
ExpiresMM = Request.Form("ExpiresMMin")
ExpiresYY = Request.Form("ExpiresYYin")
'build the date
Expires = ExpiresDD & "/" & ExpiresMM & "/" & ExpiresYY
'validate for in the future
if Expires <= Date then
errorSameDate = "True"
errorTrap = "True"
end if
I have also tried isDate(Expires) to check if todays date, as in, but no
luck again, obvs submitting todays date!
if isDate(Expires) then
errorSameDate = "True"
errorTrap = "True"
end if
Hope someone can help.
Cheers
Simon