Here you can find the source of date2Timestamp(Date value)
Parameter | Description |
---|---|
value | Date |
public static Timestamp date2Timestamp(Date value)
//package com.java2s; /*/* w ww .j a v a2 s . c o m*/ * Copyright (C) 2010 Viettel Telecom. All rights reserved. * VIETTEL PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ import java.sql.Timestamp; import java.util.Date; public class Main { /** * * @param value Date * @return Timestamp */ public static Timestamp date2Timestamp(Date value) { if (value != null) { return new Timestamp(value.getTime()); } return null; } }