beanshell 时间戳转时间日期

时间:2021-07-13 12:09:46   收藏:0   阅读:30

import java.text.SimpleDateFormat;

import java.util.Date;

SimpleDateFormat simDateFormat = new SimpleDateFormat("yyyy-MM-ed HH:mm:ss");

long stime = SampleResult.getStartTime();

Date d_stime = new Date(stime);

String s_time = simDateFormat.format(d_stime);// s_time就是格式化后的时间日期

原文:https://www.cnblogs.com/yinzone/p/15003584.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!