Here you can find the source of calendarToTimestamp(java.util.Calendar inCal)
Parameter | Description |
---|---|
inCal | Source calendar which to be converted. |
public static java.sql.Timestamp calendarToTimestamp(java.util.Calendar inCal)
//package com.java2s; /*/*w w w.j ava 2s . c o m*/ * @(#)Utility.java * * Copyright (c) 2003 DCIVision Ltd * All rights reserved. * * This software is the confidential and proprietary information of DCIVision * Ltd ("Confidential Information"). You shall not disclose such Confidential * Information and shall use it only in accordance with the terms of the license * agreement you entered into with DCIVision Ltd. */ public class Main { /** * Returns Timestamp converted from Calendar. * * @param inCal Source calendar which to be converted. * @return Timestamp object which converted from input. */ public static java.sql.Timestamp calendarToTimestamp(java.util.Calendar inCal) { if (inCal == null) { return (null); } java.sql.Timestamp time = new java.sql.Timestamp(inCal.getTime().getTime()); return (time); } }