Java Date String Format formatDate(String date)

Here you can find the source of formatDate(String date)

Description

format Date

License

Open Source License

Declaration

public static String formatDate(String date) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {

    public static String formatDate(String date) {
        String y = date.substring(0, 4);
        String m = date.substring(4, 6);
        String d = date.substring(6, 8);
        return y + "-" + m + "-" + d;
    }/*  w  w  w.  j a va 2  s .co  m*/
}

Related

  1. formatDate(Integer day, Integer month, Integer year)
  2. FormatDate(String aDate)
  3. formatDate(String date)
  4. formatDate(String date)
  5. formatDate(String date)
  6. formatDate(String date, int format)
  7. formatDate(String dateString, String delimiter)
  8. formatDate(String fieldName)
  9. FormatDate(String strDate, char DateSeparator)