private static String convertDateElementToString ( Date currentDate , SimpleDateFormat dateFormat ) { return currentDate . getTime ( ) != 0 ? dateFormat . format ( currentDate . getTime ( ) ) : "" ; }
The function to convert a date into a string according to the format used .