From a
jsp i submit a date object .In the
java code i am getting the date object in this format Wed Dec 03 00:00:00 GMT+05:30 2008.But I need the date object in this format 03-Dec-08.
What i have done so far -----
Date date=getDateOfTransaction(); // Get the date obj from the form
DateFormat dtformat=new SimpleDateFormat("dd-MMM-yy");
String trandate= dtformat.format(date); // In the string output 03-Dec-08
Date dt=(Date)dtformat.parse(trandate); //output of dt Wed Dec 03
00:00:00 GMT+05:30 2008
How can i get only this thing (03-Dec-08) in the date object....