How can change this date format "2011-09-07T00:00:00+02:00" into the "dd.MM." i.e "07.09."
Thanks in advance!
解决方案
here is a sample
edited the code:
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));
}