getTimeInMillis());转化时间格式

Calendar c = Calendar.getInstance();//日历接口
  c.set(Calendar.HOUR_OF_DAY, 11);
  c.set(Calendar.MINUTE, 20);//预定时间
  Calendar cNow = Calendar.getInstance();//当前时间
  Log.i(TAG, "设定时间:"+c.getTimeInMillis());
  Log.i(TAG, "当前时间:"+cNow.getTimeInMillis());
  String str = String.format("%tF %

  String str2 = String.format("%tF %

  Log.i(TAG, "当前时间lfdsjklgkj:"+str+"---"+str2);

你可能感兴趣的:(Android)