Here you can find the source of toSQLTimestamp(Date date)
Parameter | Description |
---|---|
date | a parameter |
public static java.sql.Timestamp toSQLTimestamp(Date date)
//package com.java2s; //License from project: LGPL import java.util.Date; public class Main { /**/* w w w . jav a 2 s . c om*/ * Convert a java.util.date in a java.sql.timestamp, in order to store the information * in a jdbc database * @param date * @return */ public static java.sql.Timestamp toSQLTimestamp(Date date) { // get the timestamp from the date java.sql.Timestamp timestamp = new java.sql.Timestamp(date.getTime()); // return the timestamp return timestamp; } }