Android Date to String Convert toStringFromDate(Date date)

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

Description

to String From Date

Declaration

public static String toStringFromDate(Date date) 

Method Source Code

//package com.java2s;

import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {
    public static String toStringFromDate(Date date) {
        // date formatter
        SimpleDateFormat sd = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss a");
        String return_date = sd.format(date);
        return return_date;
    }/*w  ww.j av a 2  s  . c  om*/
}

Related

  1. dateToString(Date date)
  2. datesToString(final Date start, final int duration)
  3. datesToString(final Date start, final int duration)
  4. convertDateToString(Date date)
  5. toSimpleDateFormattedString(Date date)
  6. toUTCFormattedString(Date date)
  7. updateDate(DatePicker picker, Date date)
  8. date2String(Date date, String s)
  9. date2String(int i, int j, int k)