Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
655 views
in Technique[技术] by (71.8m points)

asp classic - How can I compare two dates in vbscript/ASP?

Using ASP classic, I need to somehow compare two dates with each other. How can I do this?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Date1 = #rs["date"]#
Date2 = #12/1/2009#


If DateDiff("d", Date1, Date2) > 1 Then
    response.write "This date is before 12/1/2009"
Else
    response.write "This date is after 12/1/2009"
End If

HTH


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...