Question
Compare two dates with VBScript & ASP
I am trying to compare two dates, held with in two seperate
variables in VB
Script/ASP
and not having much luck, the code I am using is listed below, and no matter
what dates I put in the variable I get the same answer - past
varYearNow = year(date)
varFormYear = Request.Form("ExpYear")
If varYearNow > varFormYear
varExpiryDate = "past"
Else
varExpiryDate = "future!"
End If
Any ideas or tutorials would be welcomed.
Thanks in advance
Script/ASP
and not having much luck, the code I am using is listed below, and no matter
what dates I put in the variable I get the same answer - past
varYearNow = year(date)
varFormYear = Request.Form("ExpYear")
If varYearNow > varFormYear
varExpiryDate = "past"
Else
varExpiryDate = "future!"
End If
Any ideas or tutorials would be welcomed.
Thanks in advance
