例子:
Time = 09:41:46
Duration = 0:00:17 (IE 17 seconds)
Start Time = Time - Duration
显然,鉴于 60 分钟小时和 60 秒分钟等,我不能将其分解为小时分钟和秒并进行基本的减法运算。
我似乎无法理解如何计算这个并希望有人以前遇到过这个:)。
尝试这个
Time = 09:41:46
Duration = 0:00:17
Start_Time = FormatDateTime(Time - Duration, 3)
wscript.echo hour(Start_Time)
wscript.echo minute(Start_Time)
wscript.echo second(Start_Time)
参考:
https://www.w3schools.com/asp/asp_ref_vbscript_functions.asp#date