计算两个日期之间的天数问题!!!!!!!!!!!!!应该是简单问题!
之前从未接触过asp,现在公司要我改点以前的程序,实在写不来,请各位帮忙!
现在通过 set rs=Conn.execute(sel_sql)得到
rs("MyDate")="2006-7-25 16:07:21"(rs("MyDate")都比当前系统时间小)
在asp中怎么实现
(1)
Now() - rs("MyDate")
首先获得这两个时间之间的天数 intTianshu。
获得intTianshu后还要判断,若rs("MyDate")是当天下午5点以后即(17:00:00以后如2006-7-25 17:00:01 )
则intTianshu =intTianshu-1
(2)
表tableA中有一字段Holiday
要再count一下,如:
select count(*) from tableA where rs("MyDate")<Holiday and Now()>Holiday 得到的数目countShu
(1)(2)综合起来,最后要的结果是:intTianshu =intTianshu-1 -countShu 或intTianshu =intTianshu-
countShu
------------
之前从未接触过asp,请各位大侠写详细点,谢谢了!