日期格式1970-01-01
import java.text.SimpleDateFormat;
import java.util.Date;
public static class DateUtil {
public static String stampToDate(String s){
String res;
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
long lt = new Long(s);
Date date = new Date(lt);
res = simpleDateFormat.format(date);
return res;
}
}
String startTime = vars.get("startTime");
String date = DateUtil.stampToDate(startTime);
vars.put("startTime",date);
log.info(date);