2017-12-01 6 views
1

どのようにHP LoadRunnerで2日間の日数を計算しますか?HP LoadRunner - 2日の日数の差

私はC言語のコーディングでの経験が限られています。

+0

がhttps://stackoverflow.com/questions/13932909/difference-between-two-dates-in-cを参照してください。 –

答えて

0

あなたは冒険を感じている場合は、あなたがこれを行うことができます:

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);