public static String format ( Date date ) { DateFormat dateFormat = new SimpleDateFormat ( DateField . FORMAT ) ; return date == null ? null : dateFormat . format ( date ) ; }
Converts the given date into a string which follows the format used by date fields .