Android Timestamp Create getTimestamp()

Here you can find the source of getTimestamp()

Description

get Timestamp

Declaration

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("yyyyMMddHHmmss");
        return sdf.format(new Date())
                + (int) ((Math.random() * 900000 + 100000));
    }/* www. j av  a  2  s  .  c om*/
}

Related

  1. getCurrentTimestamp()
  2. getCurrentTimestamp()