Android Time Get getCurrentTime(String format)

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

Description

get Current Time

Declaration

public static String getCurrentTime(String format) 

Method Source Code

//package com.java2s;

import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {

    public static String getCurrentTime() {
        return getCurrentTime("yyyyMMddHHmmss");
    }/*  w  w w.  j  a  va 2 s.  c  o m*/

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

Related

  1. getCurrentTime()
  2. Now(String time)
  3. toTime(int time)
  4. getCurrentTime()
  5. intConvertTime(int hour, int minut)
  6. getCurrentTimeString()
  7. getCurrentDateTime()
  8. getCurrentTime()
  9. getFormatShortTime(Date date)