public static Date setHours ( Date d , int hours ) { Calendar cal = Calendar . getInstance ( ) ; cal . setTime ( d ) ; cal . set ( Calendar . HOUR_OF_DAY , hours ) ; return cal . getTime ( ) ; }
Set hours to a date