Android Time Get getFormatTime(Date date)

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

Description

get Format Time

License

Apache License

Declaration

public static String getFormatTime(Date date) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {
    public static String getFormatTime(Date date) {
        return getFormatDateTime(date, "yyyy-MM-dd HH:mm:ss");
    }//  ww  w  . ja  va 2 s .  c o m

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

Related

  1. getCurrentTime(String format)
  2. getCurrentTimeString()
  3. getCurrentDateTime()
  4. getCurrentTime()
  5. getFormatShortTime(Date date)
  6. getCurTimeByFormat(String format)
  7. getCurTimeByFormat(String format)
  8. getCurrentTime(String dateFormat)
  9. getDate(String time)