src/com/wherehoo/WHTimeInterval.java
/**
     * Generates <tt>Timestamp</tt> for the point in time represented by <tt>cal</tt>.
     *@param cal <tt>Calendar</tt> object. 
     *@return <tt>Timestamp</tt> that can be used in a SQL query.
     */
Generates Timestamp for the point in time represented by cal.
@param cal Calendar object.
@return Timestamp that can be used in a SQL query.
Generates Timestamp for the point in time represented by cal . @param cal Calendar object . @return Timestamp that can be used in a SQL query .
public static Timestamp calToTimeStamp(Calendar cal) {
	String s="";
	s  = cal.get(Calendar.YEAR)+"-"+(cal.get(Calendar.MONTH)+1)+"-"+cal.get(Calendar.DAY_OF_MONTH)+" ";
	s += cal.get(Calendar.HOUR_OF_DAY)+":"+cal.get(Calendar.MINUTE)+":"+cal.get(Calendar.SECOND);
	return Timestamp.valueOf(s);
    }
public static Timestamp calToTimeStamp ( Calendar cal ) { String s = "" ; s = cal . get ( Calendar . YEAR ) + "-" + ( cal . get ( Calendar . MONTH ) + 1 ) + "-" + cal . get ( Calendar . DAY_OF_MONTH ) + " " ; s += cal . get ( Calendar . HOUR_OF_DAY ) + ":" + cal . get ( Calendar . MINUTE ) + ":" + cal . get ( Calendar . SECOND ) ; return Timestamp . valueOf ( s ) ; }
Generates <tt>Timestamp</tt> for the point in time represented by <tt>cal</tt>.
Generates <tt > Timestamp< / tt > for the point in time represented by <tt > cal< / tt > .