1
JSON에서 밀리 초 (1488520800000)를 추출하여 형식화 된 날짜 (2017-03-02)로 변수에 넣는 것 같습니다. 난 못해 3 월 2 일 2017 :jmeter 변수를 밀리 초 단위로 변환하십시오.
ERROR - jmeter.util.BeanShellInterpreter: Error invoking bsh method: eval Sourced file: inline evaluation of: ``import java.text.*; import java.util.*; log.info("value for variable: 14885208 . . . '' : Typed variable declaration : Method Invocation source.parse
어떤 이상한 것은 내가 유사한 코드가 같은 추출 된 날짜를 잘 작동하는 가지고 있다는 것입니다 : 여기
import java.text.*;
import java.util.*;
SimpleDateFormat source = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
SimpleDateFormat target = new SimpleDateFormat("yyyy-MM-dd");
Date date = source.parse(vars.get("varReviewDatevalue"));
String newDate = target.format(date);
vars.put("varFormattedReviewdateValue",newDate);
내가 얻을 오류 발생 : 여기 내 코드는 밀에서 표현 된 날짜가 날짜로 변환되지 않는 이유를 찾아냅니다. 어떤 아이디어?
의 사용 가능한 복제 [자바에서 날짜 전에 currentTimeMillis을 변환하는 방법?] (HTTP : // 유래. com/questions/8237193/how-to-convert-currenttimemillis-to-a-date-in-java) –