can you convert with something like Date dateOut = new Date(currentdata.getMillisecond());, then use dateOut in your format call?
–
paulJul 23 '12 at 10:43

1

@oneofthelions Is the DateTime a joda.time class? If it is you can simply use something like this : String myDate = new SimpleDateFormat("MM/dd/yyyy").format(currentdata.toDate());
–
AxxA OsirisJul 23 '12 at 10:49

According to this line, current data may be Object.This is error point.'format' method access Date object.Change your data type.If you don't want to change this, change your currentdata (2012-08-20T12:30:00+05:30) to (2012-08-2012 30:05:30). If you won't, illegal argument exception may be occured.