long sd=1345185923140L; Date dat=new Date(sd); GregorianCalendar gc = new GregorianCalendar(); gc.setTime(dat); java.text.SimpleDateFormat format = new java.text.SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); String sb=format.format(gc.getTime()); System.out.println(sb);
原文:http://blog.csdn.net/xiaoyuan511/article/details/37923593