Here you can find the source of getCurrentTimeStamp()
@SuppressLint("SimpleDateFormat") public static String getCurrentTimeStamp()
//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 }