I am formatting a string to a date using the code
String start_dt = \'2011-01-01\';
DateFormat formatter = new SimpleDateFormat(\"YYYY-MM-DD\");
Date date
Tested this code
java.text.DateFormat formatter = new java.text.SimpleDateFormat("MM-dd-yyyy");
java.util.Date newDate = new java.util.Date();
System.out.println(formatter.format(newDate ));
http://download.oracle.com/javase/1,5.0/docs/api/java/text/SimpleDateFormat.html
Use SimpleDateFormat#format(Date):
String start_dt = "2011-01-01";
DateFormat formatter = new SimpleDateFormat("yyyy-MM-DD");
Date date = (Date)formatter.parse(start_dt);
SimpleDateFormat newFormat = new SimpleDateFormat("MM-dd-yyyy");
String finalString = newFormat.format(date);