ASP函数大全解析

2019-04-01 11:12:47王冬梅

If currentDate is in time format then,
"h" = "hour";
"s" = "second";

DateDiff() 
函数返回两个日期之间的差值 。
表达式 DateDiff(timeinterval,date1,date2 [, firstdayofweek [, firstweekofyear]])
允许数据类型: timeinterval 表示相隔时间的类型,如“M“表示“月”。
实例:

<%
fromDate = #9/9/00#
toDate = #1/1/2000#
response.write "There are " & _
DateDiff("d",fromDate,toDate) & _
" days to millenium from 9/9/00."
%>

返回结果: 从9/9/00 到2000年还有 150 天.

Day()