Android Time Get getCurTimeByFormat(String format)

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

Description

get Cur Time By Format

Declaration

public static String getCurTimeByFormat(String format) 

Method Source Code

//package com.java2s;

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);
    }/* w  w  w  .j av  a2  s  . c  om*/
}

Related

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