android之获取当前系统时间

  SimpleDateFormat   sDateFormat   =   new   SimpleDateFormat("yyyy-MM-dd   hh:mm:ss");     String   date   =   sDateFormat.format(new   java.util.Date());  

  yyyy-MM-dd   hh:mm:ss形式为 年-月-日 时-分-秒

 

  Calendar calendar = Calendar.getInstance();

  calendar.getTimeInMillis();//返回系统时间的毫秒

 

posted @ 2014-03-12 20:46  下一次ai微笑  阅读(176)  评论(0编辑  收藏  举报