Code example for Date

Methods: clone, setHours, setMinutes, setSeconds, setTime

0
		if (d instanceof java.sql.Date) {
			return d; // java.sql.Date is already truncated to date. And raises
						// an 
						// Exception if we try to set hours, minutes or seconds. 
		} 
		d = (Date) d.clone();
		d.setHours(0);
		d.setMinutes(0);
		d.setSeconds(0);
		d.setTime(((d.getTime() / 1000) * 1000));
		return d;
	} 
 
}