java--工具方法
根据时间戳得到具体的时间:
public static void main(String[] args) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
long nowTime=1379313866505l;
String date = sdf.format(new Date(nowTime));
System.out.println(date);
}
public static void main(String[] args) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
long nowTime=1379313866505l;
String date = sdf.format(new Date(nowTime));
System.out.println(date);
}