Java Date to String convertDate(Date date)

Here you can find the source of convertDate(Date date)

Description

Convert data to string with pattern (dd/MM).

License

Apache License

Parameter

Parameter Description
date a parameter

Declaration

public static String convertDate(Date date) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

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

public class Main {
    /**/*from www.  j  av a 2 s.c  o m*/
     * Convert data to string with pattern (dd/MM).
     * @param date
     * @return
     */
    public static String convertDate(Date date) {
        DateFormat format = new SimpleDateFormat("dd/MM");
        return format.format(date);
    }
}

Related

  1. convert(Date date)
  2. convert(Date date, String style)
  3. convertDate(Date d)
  4. convertDate(Date date)
  5. convertDate(Date date)
  6. convertDate(Date passedDate)
  7. convertDate(final Date date)
  8. convertDate2Str(java.util.Date date, String format, String defaultValue)