Android Time Get getFormatShortTime(Date date)

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

Description

get Format Short Time

License

Apache License

Declaration

public static String getFormatShortTime(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 getFormatShortTime(Date date) {
        return getFormatDateTime(date, "yyyy-MM-dd");
    }//from  www .j av a  2  s.  c  om

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

Related

  1. intConvertTime(int hour, int minut)
  2. getCurrentTime(String format)
  3. getCurrentTimeString()
  4. getCurrentDateTime()
  5. getCurrentTime()
  6. getFormatTime(Date date)
  7. getCurTimeByFormat(String format)
  8. getCurTimeByFormat(String format)
  9. getCurrentTime(String dateFormat)