Android Time Get getCurTimeByFormat(String format)

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

Description

get Cur Time By Format

License

Apache License

Declaration

public static String getCurTimeByFormat(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 getCurTimeByFormat(String format) {
        Date newdate = new Date(System.currentTimeMillis());
        SimpleDateFormat sdf = new SimpleDateFormat(format);
        return sdf.format(newdate);
    }/*from   w w w  .j a  va  2s .com*/
}

Related

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