Here you can find the source of getStamp(Timestamp timestamp)
public static String getStamp(Timestamp timestamp)
//package com.java2s; //License from project: Apache License import java.sql.Timestamp; public class Main { public static String getStamp(Timestamp timestamp) { String stamp = timestamp.toString(); stamp = stamp.replaceAll("-", ""); stamp = stamp.replaceAll(":", ""); stamp = stamp.replaceAll("\\.", ""); stamp = stamp.replaceAll(" ", ""); return stamp; }/*from www. j av a 2 s .co m*/ }