Android Date Format formatDate(Date d)

Here you can find the source of formatDate(Date d)

Description

Formats the input date to string.

Parameter

Parameter Description
d the date

Return

the string representation of the date

Declaration

public static String formatDate(Date d) 

Method Source Code

//package com.java2s;
import java.text.DateFormat;

import java.util.Date;

public class Main {
    /**//from   w  w  w  .  java  2s.co m
     * Formats the input date to string.
     * @param d the date
     * @return the string representation of the date
     */
    public static String formatDate(Date d) {
        return d != null ? DateFormat.getDateInstance().format(d) : "";
    }
}

Related

  1. getMainClockString(Date utcDate)
  2. currentDateToString(String format)
  3. dateToString(Date paramDate, String paramString)
  4. changeDateToFormatString(Date fecha, String pattern)
  5. createName(String format, long dateTaken)
  6. formatterDate(Date date)