日期:2014-05-20 浏览次数:20773 次
public class Test1
{
public static void main(String[] args) throws ParseException
{
String s = "6 20 0 0 8 4 0 8 4 3a 79 24 d6 4e 3 time = Tue Aug 13 10:40:29 CST 2012";
String[] a = s.split("time = ");
for (String as :a) System.out.println(as);
String da = a[1];
System.out.println(a[1]);
Date daw = new Date(da);
System.out.println(daw);
SimpleDateFormat ss = new SimpleDateFormat("yyyy-MM-dd");
String aa = ss.format(daw);
System.out.println(aa);
}
}
6 20 0 0 8 4 0 8 4 3a 79 24 d6 4e 3
Tue Aug 13 10:40:29 CST 2012
Tue Aug 13 10:40:29 CST 2012
Tue Aug 14 00:40:29 CST 2012
2012-08-14