Android Utililty Methods Timestamp Get

List of utility methods to do Timestamp Get

Description

The list of methods to do Timestamp Get are organized into topic(s).

Method

StringgetTimeStamp()
get Time Stamp
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String timeStamp = sdf.format(new Date(System.currentTimeMillis()));
return timeStamp;
StringgetTimestamp(Context context)
Return a timestamp
String timestamp;
Date now = new Date();
java.text.DateFormat dateFormat = android.text.format.DateFormat
        .getDateFormat(context);
java.text.DateFormat timeFormat = android.text.format.DateFormat
        .getTimeFormat(context);
timestamp = dateFormat.format(now) + ' ' + timeFormat.format(now);
return timestamp;
...