Android Time Get getCurrentTimeStamp()

Here you can find the source of getCurrentTimeStamp()

Description

get Current Time Stamp

Declaration

@SuppressLint("SimpleDateFormat")
    public static String getCurrentTimeStamp() 

Method Source Code

//package com.java2s;

import java.text.SimpleDateFormat;

import java.util.Date;
import android.annotation.SuppressLint;

public class Main {
    @SuppressLint("SimpleDateFormat")
    public static String getCurrentTimeStamp() {
        Date date = new Date(System.currentTimeMillis());
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

        String text = sdf.format(date);

        return text;
    }//w w w . j a v a  2  s. c  o m
}

Related

  1. getTimeStamp()
  2. getTimeString(long time)
  3. getTimestamp()
  4. getCurrentTime()
  5. getCurrentTime()
  6. getNow()
  7. getNow()
  8. now()
  9. getCompactTime()