tags:

views:

50

answers:

2

I got the answer: It's very simple.

DateTimeFormatter fmt = DateTimeFormat.forPattern("MM/dd/yyyy");
String formattedDate = jodeLocalDateObj.toString( fmt );
+1  A: 
DateTimeFormatter fmt = DateTimeFormat.forPattern("MM/dd/yyyy");
String formattedDate = jodeLocalDateObj.toString( fmt );
Surya Rao Rayarao
+1  A: 

While the answer you've found will work, I prefer to look at it the other way round, in terms of which object is "active" (in terms of formatting) and which is just providing data:

LocalDate localDate = new LocalDate(2010, 9, 14);
DateTimeFormatter formatter = DateTimeFormat.forPattern("MM/dd/yyyy");
String formattedDate = formatter.print(localDate);
Jon Skeet