Android Utililty Methods Timestamp Create

List of utility methods to do Timestamp Create

Description

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

Method

StringgetTimestamp()
get Timestamp
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss");
return sdf.format(new Date())
        + (int) ((Math.random() * 900000 + 100000));
StringgetCurrentTimestamp()
Get current time include time zone to save to DB
return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(Calendar
        .getInstance().getTime());
StringgetCurrentTimestamp()
Get current time include time zone to save to DB
return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(Calendar
        .getInstance().getTime());