Hi,

I'm doing a sample in CN1 and in this sample i tried to convert the date 
from one pattern to another.


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


-- 
You received this message because you are subscribed to the Google Groups 
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/bdbe2363-6b64-45f6-a6b5-bd60cf7b5f28%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to