Java Date String Format formatShort(String strDate)

Here you can find the source of formatShort(String strDate)

Description

format Short

License

Open Source License

Declaration

public static String formatShort(String strDate) 

Method Source Code

//package com.java2s;

public class Main {

    public static String formatShort(String strDate) {
        String ret = "";
        if (strDate != null && !"1900-01-01 00:00:00.0".equals(strDate) && strDate.indexOf("-") > 0) {
            ret = strDate;//from   w  w w  . ja v a2s .  c o  m
            if (ret.indexOf(" ") > -1)
                ret = ret.substring(0, ret.indexOf(" "));
        }
        return ret;
    }
}

Related

  1. formate8Date(String str)
  2. formatIso8601ToSimpleDate(String iso8601)
  3. formatISODate(String date)
  4. formatMinDateForShowWith_(String str)
  5. formatQuery(String queryDate)
  6. formatShow(String queryDate)
  7. formatTweetDate1(String date)