Android Date Format formatDate(Date d)

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

Description

format Date

Parameter

Parameter Description

Return

: String

Declaration

public static String formatDate(Date d) 

Method Source Code

//package com.java2s;

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

public class Main {
    /**/*w  w w .j a v a2 s .  c o  m*/
     * @Title : formatDate
     * @param : @param d
     * @return : String
     */
    public static String formatDate(Date d) {
        SimpleDateFormat s = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        return s.format(d);
    }

    /**
     * @Title : formatDate
     * @param : @param s
     * @param : @param d
     * @return : String
     */
    public static String formatDate(SimpleDateFormat s, Date d) {
        return s.format(d);
    }
}

Related

  1. format(Date date, boolean isDateOnly)
  2. formatDA(Date d)
  3. formatDT(Date d)
  4. formatDate(Context context, Calendar date, FileTimeDisplay fileTimeDisplay)
  5. formatDate(Context context, long millis, FileTimeDisplay fileTimeDisplay)
  6. formatDate(Date date)
  7. formatDate(Date date)
  8. formatDate(Date date)
  9. formatDate(Date date)