Android Date Format ParseDateToString(Date date)

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

Description

Parse Date To String

Declaration

public static String ParseDateToString(Date date) 

Method Source Code

//package com.java2s;

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

public class Main {
    public static String ParseDateToString(Date date) {
        return ParseDateToString(date, "yyyy-MM-dd HH:mm:ss");
    }//from  ww  w . j av  a2s  .  c om

    public static String ParseDateToString(Date date, String format) {
        SimpleDateFormat dateFormat = new SimpleDateFormat(format);

        return dateFormat.format(date);
    }
}

Related

  1. FormatToString(Date date, String format)
  2. FormatToString(String date, String format)
  3. ParseDateToString(Date date, String format)
  4. date(Date date)
  5. format(Date date)
  6. format(Date date, String format)