Here you can find the source of getTimestamp()
public static Timestamp getTimestamp()
//package com.java2s; //License from project: Open Source License import java.sql.Timestamp; import java.util.Date; public class Main { public static Timestamp getTimestamp() { Date utilDate = new Date(); Timestamp sq = new Timestamp(utilDate.getTime()); System.out.println(sq);//from w w w . j a va2 s .co m return sq; } }