java将时间戳转换为日期的方法 这里的时间戳是10位数字 public static String stampToDate(String s) { String res; SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM"); long lt = new Long(s); Date date = new Date(lt*1000); res = simpleDateFormat.format(date); return res; } 如果是13位的时间戳,把 lt*1000 改为 lt即可