怎么没人回答啊,是不是我没说清楚啊!?
我补充以下:
long l=Url.openConnection().getLastModified();
 //得到这个流的最后修改日期
但这是个long型的,如果我要得到我们常用的日期表示形式,该如何转换啊?!

解决方案 »

  1.   

    Calendar calendar = Calendar.getInstanct();
    calendar.setTimeInMillis(l);System.out.println(calendar); or
    Date date = new Date(l);
    //then use SimpleDateFormat format it
      

  2.   

    我是这样处理的:
    long l=Url.openConnection().getLastModified();
    Calendar calendar = Calendar.getInstance();
    calendar.setTimeInMillis(l);            
    System.out.println(calendar.getTime());
    输出如下:
    Sat May 17 19:33:23 CST 2003
    如果要得到数字化的输出该怎么办?(形如:5/17/19:33:23/2003)
      

  3.   

    please use SimpleDateFormat!