Android Date Format getFormatDate(Date date)

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

Description

get Format Date

Declaration

public static String getFormatDate(Date date) 

Method Source Code

//package com.java2s;

import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {
    public static String getFormatDate(Date date) {
        return getFormatDateTime(date, "yyyy-MM-dd");
    }/*from  w ww. ja va 2s.  c o m*/

    public static String getFormatDate(String format) {
        return getFormatDateTime(new Date(), format);
    }

    public static String getFormatDateTime(Date date, String format) {
        SimpleDateFormat sdf = new SimpleDateFormat(format);
        return sdf.format(date);
    }
}

Related

  1. getDefaultFormatter(Date date)
  2. getFormatCurrentAdd(int amount, String format)
  3. getFormatCurrentTime(String format)
  4. getFormatCurrentTime(String format)
  5. getFormatDate(Date date)
  6. getFormatDate(String format)
  7. getFormatDate(String format)
  8. getFormatDateAdd(Date date, int amount, String format)
  9. getFormatDateAdd(Date date, int amount, String format)