NdsBeisUi/src/main/java/com/northgateps/nds/beis/ui/util/NdsDateTimeUtils.java
/**
     * Formats given date in dateTimeFormat and in Locale's default date format if dateTimeFormat is not defined in properties file.
     * 
     * @return formattedDate -formatted date
     */
Formats given date in dateTimeFormat and in Locale's default date format if dateTimeFormat is not defined in properties file.

@return formattedDate -formatted date
Formats given date in dateTimeFormat and in Locale ' s default date format if dateTimeFormat is not defined in properties file . @return formattedDate - formatted date
public static String dateFormatter(String date) {
        String formattedDate = "";
        String dateFormat = "";
        if (date==null || date.equals("")){
            return formattedDate;
        }
        ZonedDateTime dateTime = getDateTime(date); 
        try {
            dateFormat = ConfigurationFactory.getConfiguration().getString("dateFormat");
            if (!dateFormat.isEmpty()) {
                DateTimeFormatter formatter = DateTimeFormatter.ofPattern(dateFormat);
                formattedDate = formatter.format(dateTime);
            }
        } catch (NoSuchElementException e) {
            DateTimeFormatter formatter = DateTimeFormatter.ofLocalizedDateTime(FormatStyle.SHORT);            
            formattedDate = formatter.format(dateTime.toLocalDate());           
        }
        return formattedDate;
    }
public static String dateFormatter ( String date ) { String formattedDate = "" ; String dateFormat = "" ; if ( date == null || date . equals ( "" ) ) { return formattedDate ; } ZonedDateTime dateTime = getDateTime ( date ) ; try { dateFormat = ConfigurationFactory . getConfiguration ( ) . getString ( "dateFormat" ) ; if ( ! dateFormat . isEmpty ( ) ) { DateTimeFormatter formatter = DateTimeFormatter . ofPattern ( dateFormat ) ; formattedDate = formatter . format ( dateTime ) ; } } catch ( NoSuchElementException e ) { DateTimeFormatter formatter = DateTimeFormatter . ofLocalizedDateTime ( FormatStyle . SHORT ) ; formattedDate = formatter . format ( dateTime . toLocalDate ( ) ) ; } return formattedDate ; }
Formats given date in dateTimeFormat and in Locale's default date format if dateTimeFormat is not defined in properties file.
Formats given date in dateTimeFormat and in Locale ' s default date format if dateTimeFormat is not defined in properties file .
// This exception occurs if dateTimeFormat is not defined            