HP LoadRunner - 2 个日期之间的天数差异
HP LoadRunner - Difference between 2 dates in Days
如何计算 HP LoadRunner 中两个日期之间的天数。
我对 C 语言编码的经验有限。
如果您喜欢冒险,可以这样做:
web_js_run(
"Code=days_between=function(firstDate,secondDate) {return Math.floor((Date.parse(secondDate)-Date.parse(firstDate))/1000/60/60/24);}",
LAST);
lr_save_string("11/20/2017 23:41:20","D1");
lr_save_string("12/01/2017 02:56:32","D2");
web_js_run(
"Code=days_between(LR.getParam('D1'),LR.getParam('D2'));",
"ResultParam=days_between",
LAST);
如何计算 HP LoadRunner 中两个日期之间的天数。
我对 C 语言编码的经验有限。
如果您喜欢冒险,可以这样做:
web_js_run(
"Code=days_between=function(firstDate,secondDate) {return Math.floor((Date.parse(secondDate)-Date.parse(firstDate))/1000/60/60/24);}",
LAST);
lr_save_string("11/20/2017 23:41:20","D1");
lr_save_string("12/01/2017 02:56:32","D2");
web_js_run(
"Code=days_between(LR.getParam('D1'),LR.getParam('D2'));",
"ResultParam=days_between",
LAST);