如何比较 vbscript/ASP 中的两个日期? [英] How can I compare two dates in vbscript/ASP?
本文介绍了如何比较 vbscript/ASP 中的两个日期?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
使用 ASP classic,我需要以某种方式相互比较两个日期.我该怎么做?
Using ASP classic, I need to somehow compare two dates with each other. How can I do this?
推荐答案
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
这篇关于如何比较 vbscript/ASP 中的两个日期?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文