代码改变世界

时间戳与日期相互转换

2016-03-18 15:28  VinpleZhang  阅读(225)  评论(0编辑  收藏  举报

public static String timeStamp2Date(Long seconds) {
if(null==seconds){
return "";
}
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Long time = new Long(seconds);
String d = format.format(time);
return d;
}
}

 

http://blog.csdn.net/heng615975867/article/details/36016617