datediff函数的使用方法是如何的
发布于 2020-02-19 05:00:19 浏览 330 次
问题解析:
【】
1、
1、datediff函数语法用法: 表达式DateDiff(timeinterval,date1,date2 [, firstdayofweek [, firstweekofyear]]) 允许数据类型: timeinterval 表示相隔时间的类型,代码为:年份 yy、yyyy 季度 qq、q;月份 mm、m;每年的某一日 dy、y;日期 dd、d;星期 wk、ww;工作日 dw;小时 hh;分钟 mi、n;秒 ss、s;毫秒 ms。 2、datediff函数用法示例: <% 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 天。