String cc_time) { String re_StrTime = null;SimpleDateFormat sdf = new SimpleDateFormat("yyyy年MM月dd日HH时mm分ss秒");// 例如:cc_time=1291778220 long lcc_time = Long.valueOf(cc_time);re_StrTime = sdf.format(new Date(lcc_time * 1000L));return re_StrTime;} ...
java如何将时间戳转换为时间字符串
public static String getStrTime(String cc_time) {
String re_StrTime = null;
SimpleDateFormat sdf = new SimpleDateFormat("yyyy年MM月dd日HH时mm分ss秒");
// 例如:cc_time=1291778220
long lcc_time = Long.valueOf(cc_time);
re_StrTime = sdf.format(new Date(lcc_time * 1000L));
return re_StrTime;
}2016-12-12