Here you can find the source of getCurrentTimeStamp()
public static Timestamp getCurrentTimeStamp()
//package com.java2s; /*// w ww. j a v a 2 s . co m * Copyright (c) 2015 Stephan D. Cote' - All rights reserved. * * This program and the accompanying materials are made available under the * terms of the MIT License which accompanies this distribution, and is * available at http://creativecommons.org/licenses/MIT/ * * Contributors: * Stephan D. Cote * - Initial concept and implementation */ import java.sql.Timestamp; public class Main { public static Timestamp getCurrentTimeStamp() { return getTimeStamp(new java.util.Date()); } public static Timestamp getTimeStamp(java.util.Date date) { return new Timestamp(date.getTime()); } }