public static String getDateTimeStr ( Date d ) { if ( d == null ) return "" ; SimpleDateFormat sdf = new SimpleDateFormat ( "yyyy-MM-dd HH:mm:ss.SSSZ" ) ; // 20140315 test will problem +0000 return sdf . format ( d ) ; }
Gets the date time str .