Android Date Format getFormatCurrentTime(String format)

Here you can find the source of getFormatCurrentTime(String format)

Description

get Format Current Time

License

Apache License

Declaration

public static String getFormatCurrentTime(String format) 

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 getFormatCurrentTime(String format) {
        return getFormatDateTime(new Date(), format);
    }/*from w w  w  .j a v a  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()
  2. getCurrentYear()
  3. getDateEN()
  4. getDefaultFormatter(Date date)
  5. getFormatCurrentAdd(int amount, String format)
  6. getFormatCurrentTime(String format)
  7. getFormatDate(Date date)
  8. getFormatDate(Date date)
  9. getFormatDate(String format)