标签:family date mem instance 如何 时间 new imei size
1. Calendar类型转化为Date类型和long类型
Calendar calendar=Calendar.getInstance();
Date date=calendar.getTime();
long time=calendar.getTimeInMillis();
2.Date类型转化为Calendar类型和long类型
Date date=new Date(System.currentTimeMillis()+100000000);
Calendar calendar=Calendar.getInstance();
calendar.setTime(date);
long time=date.getTime();
3. long类型转化为Date类型和Calendar类型
long time=System.currentTimeMillis()+100000000;
Date date=new Date(time);
Calendar calendar=Calendar.getInstance();
calendar.setTimeInMillis(time);
Calendar、Date、long类型的时间,三者之间如何转化
标签:family date mem instance 如何 时间 new imei size
原文地址:http://www.cnblogs.com/bdqnhhm/p/6683155.html