标签:
1、时间戳转换为date
long sjc=1442633777; SimpleDateFormat t = new SimpleDateFormat("yyyyMMddHHmmss"); String date = t.format(new Date(sjc*1000)); System.out.println(date);
2、date转换为时间戳
SimpleDateFormat simpleDateFormat =new SimpleDateFormat("yyyyMMddHHmmss"); Date date=simpleDateFormat .parse("20150919102427"); long timeStemp = date.getTime(); System.out.println(timeStemp );
标签:
原文地址:http://www.cnblogs.com/lincj/p/4821762.html