Android Time Get getTimeString(long time)

Here you can find the source of getTimeString(long time)

Description

get Time String

Declaration

public static final String getTimeString(long time) 

Method Source Code

//package com.java2s;
import java.text.SimpleDateFormat;
import java.util.Date;
import android.annotation.SuppressLint;

public class Main {
    @SuppressLint("SimpleDateFormat")
    private static final SimpleDateFormat dateFormat = new SimpleDateFormat(
            "yyyy-MM-dd HH:mm:ss");

    public static final String getTimeString(long time) {
        return dateFormat.format(new Date(time));
    }/*from ww w  .  ja  v  a  2  s  .  c  o m*/
}

Related

  1. getTime()
  2. getTime()
  3. getCurrentlyDateTime()
  4. now()
  5. getTimeStamp()
  6. getTimestamp()
  7. getCurrentTime()
  8. getCurrentTime()
  9. getCurrentTimeStamp()