Here you can find the source of formatShort(String strDate)
public static String formatShort(String strDate)
//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; } }