经典日期格式 ASP

Date Formatting in Classic ASP

我正在用 Classic ASP 填写注册表格,并想关闭注册。我在变量 "closingdate" 中声明了截止日期,并有另一个变量获取当前日期。

dim closingdate : closingdate = "5/17/2014"
response.write("Closing date: " & closingdate & "<br>")

dim currentdate : currentdate = Date
response.write(currentdate)
response.write("<br>")

if (currentdate > closingdate) then 
  response.write("Registrations are closed")
else 
  response.write("Registrations are still open")
end if 

现在给我的结果是 "Registrations are still open",尽管我将截止日期设置为一年前的日期。我在这里遗漏了什么吗?

首先尝试将字符串转换为日期:

if (currentdate > cdate(closingdate)) then
  response.write("Registrations are closed")
else
  response.write("Registrations are still open")
end if