日期:2014-05-20 浏览次数:21101 次
public static void main(String[] args) {
String str = "07:dd:09:18:09:14:20:00";
String[] s = str.split(":");
int year = Integer.valueOf(s[0]+s[1], 16);
int month = Integer.valueOf(s[2], 16);
int day = Integer.valueOf(s[3], 16);
int hour = Integer.valueOf(s[4], 16);
int minute = Integer.valueOf(s[5], 16);
int second = Integer.valueOf(s[6], 16);
int ssecond = Integer.valueOf(s[7], 16);
String date = year+"-"+month+"-"+day+","+hour+":"+minute+":"+second+":"+ssecond;
System.out.println(date);
}