Android Timestamp Get getTimeStamp()

Here you can find the source of getTimeStamp()


get Time Stamp


public static String getTimeStamp() 

Method Source Code

//package com.java2s;
import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {
    public static String getTimeStamp() {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        String timeStamp = sdf.format(new Date(System.currentTimeMillis()));
        return timeStamp;
    }//from ww  w.ja v a 2  s.c o m


  1. getLastOfMonth(Timestamp t1)
  2. getLastOfYear(Timestamp t1)
  3. getRelativeTimeofTweet(String timeStamp)
  4. getTimestamp(Timestamp timestamp, int day, int hour, int minute)
  5. getWeekOfYear(Calendar cal, Timestamp ts)
  6. getTimestamp(Context context)