public static String convertTWDateToADDate(String twDate) {
String addate = "";
if (twDate.length() != 7)
return "";
try {
int yy = Integer.valueOf(twDate.substring(0, 3)).intValue() + 1911;
String year = String.valueOf(yy);
String month = twDate.substring(3, 5);
String day = twDate.substring(5, 7);
addate = year + "-" + month + "-" + day;
} catch (Exception ignore) {
addate = "";
}
return addate;
}
沒有留言:
張貼留言