这是一个样本
编辑了代码:
public static void main(String[] args) throws ParseException {
String input = "2011-09-07T00:00:00+02:00";
SimpleDateFormat inputDf = new SimpleDateFormat("yyyy-MM-dd");
SimpleDateFormat outputDf = new SimpleDateFormat("dd.MM");
Date date = inputDf.parse(input.substring(0,9));
System.out.println(date);
System.out.println(outputDf.format(date));
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
24302 次 |
| 最近记录: |