here is method what i'm using to convert date:
private String convertDateFormat(String fromDate) {
DateFormat df=new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy");
Date d= null;
try {
d = df.parse(fromDate);
} catch (ParseException e) {
e.printStackTrace();
}
df=new SimpleDateFormat("yyyyMMdd");
System.out.println(df.format(d));
return df.format(d);
}calling the method
String convertedDate = convertDateFormat("Sun Aug 14 16:13:39 GMT+05:30 2016");
above code is working in simulator but when i runs in the device i'm getting "com.codename1.l10n.ParseException: Invalid timezone value" Exception..
How can i fix this?
Thanks