你这个是什么格式呀?
如果是yyyyMMddHHmmss
那么就用
SimpleDateFormat formatter=new SimpleDateFormat("yyyyMMddHHmmss");
String time=formatter.format(new Date());//得到当前时间

解决方案 »

  1.   

    please describe your pattern, otherwise people dont understand what each number represents in your string 1102....you can simly create a SimpleDateFormat, apply the desired pattern on your date. Read the API doc of SimpleDateFormat.
      

  2.   

    long timeLong = System.currentTimeMillis();
      

  3.   

    那我如何把一个时间转化为这种timemilis的形式呢?
      

  4.   

    Date: long timeMillis = date.getTime();
    Calendar: long timeMillis = date.getTimeInMillis();