code: public static String getDateAsString(FacesContext fc, DateTimePicker dtp, Object value, String javaFormatString, Locale locale) {
  		if (value == null) {
  			return null;
  		}
  
  		Converter converter = dtp.getConverter();
  		return  converter == null ?
  				getInternalDateAsString(value, javaFormatString, locale)
  				:
  				converter.getAsString(fc, dtp, value);
  
  	}
docs: Get date in string format
  @param fc The FacesContext
  @param dtp the DateTimePicker component
  @param value The date to display
  @param javaFormatString The format string as defined by the SimpleDateFormat syntax
  @param locale The locale
  @return null if the value is null.