1.时间戳字符串转化为long型:Long time= new Long("字符串");
2..定义转化格式:SimpleDateFormat sdf = new SimpleDateFormat( " yyyy-MM-dd HH:mm:ss " );
3.long型转化为时间字符串:String str = sdf.format(time);
4.时间字符串转为date型:Date date =sdf.parse(str);
1.时间戳字符串转化为long型:Long time= new Long("字符串");
2..定义转化格式:SimpleDateFormat sdf = new SimpleDateFormat( " yyyy-MM-dd HH:mm:ss " );
3.long型转化为时间字符串:String str = sdf.format(time);
4.时间字符串转为date型:Date date =sdf.parse(str);