以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  日期加减  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=84930)

--  作者:qianqian1530
--  发布时间:2016/5/13 11:39:00
--  日期加减

两个 日期怎么 相减

 

想要的效果是 ,

 

if   今天  -  过去的某一天 >7 then

 

...

 

end if


--  作者:大红袍
--  发布时间:2016/5/13 11:40:00
--  

 

http://www.foxtable.com/help/topics/0287.htm

 

DateDiff(interval,date1,date2)
返回两个日期之间的间隔。
Interval 包含以下设置:
yyyy 年
q    季度
m    月
y    某年的某一天
d    天
w    工作日
ww   周
h    时
n    分
s    秒


--  作者:qianqian1530
--  发布时间:2016/5/13 11:46:00
--  

么么~

 

Dim d1 as Date = #3/17/2002 12:30#
Dim
d2 as Date = #1/1/2008 18:30#
Dim t As TimeSpan = d2 - d1

Output.Show(t.TotalDays &
"")