List of utility methods to do Timestamp Get
String | getTimeStamp() get Time Stamp SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); String timeStamp = sdf.format(new Date(System.currentTimeMillis())); return timeStamp; |
String | getTimestamp(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; ... |