Android Time Get getCurrentTime()

Here you can find the source of getCurrentTime()

Description

get Current Time

License

Apache License

Declaration

public static String getCurrentTime() 

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 getCurrentTime() {
        return getFormatDateTime(new Date(), "yyyy-MM-dd HH:mm:ss");
    }// w  w  w  .  j  a v  a2s. c o m

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

Related

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