Search code examples
java-melwuit

String to date Format in j2me


I have a String Wed, 22 Aug 2012 06:29:31 +0530 like this, now I want to convert this String to a date format and I need to display day an date Wed, 22 Aug 2012 like this and eliminating other remaining String?

I need to display the date on my LWUIT form Screen


Solution

  • String date = "Wed, 22 Aug 2012 06:29:31 +0530";
    String shortDate = date.substring(0, 16);