Java Date Format convertDateToStringUI(Date data)

Here you can find the source of convertDateToStringUI(Date data)

Description

convert Date To String UI

License

Open Source License

Declaration

public static String convertDateToStringUI(Date data) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.text.DateFormat;

import java.text.SimpleDateFormat;
import java.util.Date;

public class Main {
    public static String convertDateToStringUI(Date data) {
        if (data == null)
            return null;

        String date = null;/*  w  w  w  .  j  a v  a  2s  . c om*/
        try {
            DateFormat formatter = new SimpleDateFormat("dd/MM/yyyy");
            date = formatter.format(data);
        } catch (Exception e) {
            System.err.println(e.getMessage());
        }
        return date;
    }
}

Related

  1. convertDateToString(Date date, String pattern)
  2. convertDateToString(Date date, String patternString, Locale locale)
  3. convertDateToString(Date dateObject, String dateFormat)
  4. convertDateToStringByFormat(Date date)
  5. convertDateToStringT(final Date date)
  6. convertDateToText(Date date)
  7. convertDateToUTC(Date date)
  8. convertDateToXSDString(Date date)
  9. convertDayToString(Date aDate)