81,115
社区成员
发帖
与我相关
我的任务
分享
public class Test
{
public static void main(String[] args) throws Exception{
SimpleDateFormat format = new SimpleDateFormat(
"yyyy-MM-dd HH:mm:ss");
System.out.println(format.parse("2009-05-04 09:28:00").getTime());
System.out.println(format.format(new Date(1241400315718L)));
}
}
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
System.out.println(format.parse("2009-05-04 09:28:00").getTime());
System.out.println(format.format(new Date(1241400480000L)));