I am trying to retreive a string in this format dd-MM-yyyy hh:mm:ss a from Oracle database from the column of type Date which has value 10/09/2007 07:11:16
Date strfinaldate = new java.util.Date( rs.getTimestamp (10).getDate()+ rs.getTimestamp (10).getTime()) ;
SimpleDateForma t sf = new SimpleDateForma t ("dd-MM-yyyy hh:mm:ss a");
String formatteddate = sf.format(strfi naldate );
But I am getting the o/p as 10-09-2007 12:00:00 am
Please tell me how do I get the exact date/time
Thanks
Date strfinaldate = new java.util.Date( rs.getTimestamp (10).getDate()+ rs.getTimestamp (10).getTime()) ;
SimpleDateForma t sf = new SimpleDateForma t ("dd-MM-yyyy hh:mm:ss a");
String formatteddate = sf.format(strfi naldate );
But I am getting the o/p as 10-09-2007 12:00:00 am
Please tell me how do I get the exact date/time
Thanks
Comment