Jmeter-日期格式转换为时间戳
作者:互联网
//将日期格式转换为时间戳 String begin = vars.get("first"); String end = vars.get("last"); Date beginTime1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(begin); Date endTime1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(last); String beginTime = String.valueOf(beginTime1.getTime()); String endTime = String.valueOf(endTime1.getTime()); vars.put("beginTime",beginTime); vars.put("endTime",endTime);
标签:endTime,String,vars,ss,getTime,日期,beginTime,格式,Jmeter 来源: https://www.cnblogs.com/Face-All/p/15161781.html