Java Date String Format formatIso8601ToSimpleDate(String iso8601)

Here you can find the source of formatIso8601ToSimpleDate(String iso8601)

Description

format Iso To Simple Date

License

Apache License

Declaration

public static String formatIso8601ToSimpleDate(String iso8601) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    private static final String DATE_SEPARATOR = "/";

    public static String formatIso8601ToSimpleDate(String iso8601) {
        String date = iso8601.split("T")[0];
        String[] parts = date.split("-");
        StringBuilder sb = new StringBuilder();
        sb.append(parts[2]).append(DATE_SEPARATOR).append(parts[1]).append(DATE_SEPARATOR).append(parts[0]);
        return sb.toString();
    }/* w w w.j a  va 2s  . c o  m*/
}

Related

  1. formatDateString(String dateString)
  2. FormatDateString(String dateString)
  3. formatDateToParse(String date, String errorMessage)
  4. formatDay(String date)
  5. formate8Date(String str)
  6. formatISODate(String date)
  7. formatMinDateForShowWith_(String str)
  8. formatQuery(String queryDate)
  9. formatShort(String strDate)