在当前日期添加超过1周的天数时,vbscript出错。 [英] Error in vbscript when adding more than 1 week days in current date.
本文介绍了在当前日期添加超过1周的天数时,vbscript出错。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我目前面临的一个问题是在我目前的日期加入了没有天数。
我在下面使用日期,粗体错误:
m_startDate = DateAdd( d, 1 , date )
m_startTime = 00:00
' 如果是星期六
如果工作日(m_startDate)= < span class =code-digit> 7 那么
' m_endDate = DateAdd(d,2,m_startDate)
m_endDate = DateAdd( d, 17 ,m_startDate)
else
' m_endDate = m_startDate
< big> < / big > m_endDate = DateAdd( d, 15 ,m_startDate)
end if
m_endTime = 23:59
请知道如何在当前日期添加15天。
谢谢。
解决方案
你应该检查整个脚本代码,因为它提供的部分代码正在执行而没有错误。
所以,代码如下:
m_endDate = DateAdd( d, 15 ,m_startDate)
将15天添加到m_startDate
。
Hi,
I am currently facing an issue while adding no of days in my current date varailbe.
I am using below date,error in bold line:
m_startDate = DateAdd("d",1,date)
m_startTime = "00:00"
'if it is saturday
if Weekday(m_startDate) = 7 THEN
'm_endDate = DateAdd("d",2,m_startDate)
m_endDate = DateAdd("d",17,m_startDate)
else
'm_endDate = m_startDate
<big></big> m_endDate = DateAdd("d",15,m_startDate)
end if
m_endTime = "23:59"
kindly sugggest how can I add 15 days to the current date .
Thanks.
解决方案
You should check entire code of script, because provided part of it is executing without errors.
So, below code:
m_endDate = DateAdd("d",15,m_startDate)
adds 15 days tom_startDate
.
这篇关于在当前日期添加超过1周的天数时,vbscript出错。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文