×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Jul 2012
    Location
    India
    Posts
    103

    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?i need to display the date on my LWUIT form Screen

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,751

    Re: String to date Format in j2me

    DateFormat would be the class for that in any "larger" Java variant, but it is not available here as I know. However in theory you can try extracting it from a JDK, but it seems to have some really mystical dependencies.

  3. #3
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,087

    Re: String to date Format in j2me

    Quote Originally Posted by pavanragi View Post
    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?i need to display the date on my LWUIT form Screen
    As DateFormat methods are not available in J2me, so yo can use String operation - String.substring(int beginIndex, int endIndex)
    i.e. "Wed, 22 Aug 2012 06:29:31 +0530".substring(0, 16); to get the required date format from given string.
    thanks,
    ~Amitabh
    (Champion of the Month -Aug'13)
    Follow me on my blog for Innovative Mobile Apps

Similar Threads

  1. Get the date as String from j2me form
    By bvsbh in forum Mobile Java General
    Replies: 5
    Last Post: 2012-05-05, 18:44
  2. How to get 24 hours date time format in J2ME ?
    By maaz4 in forum Mobile Java General
    Replies: 4
    Last Post: 2011-12-15, 12:01
  3. j2me date format
    By cyrus_gt07 in forum Mobile Java General
    Replies: 3
    Last Post: 2010-08-04, 17:27
  4. Calendar and Date format in J2ME
    By kimi007 in forum Mobile Java General
    Replies: 3
    Last Post: 2009-02-03, 22:14
  5. String to Date
    By Supraja in forum Mobile Java General
    Replies: 1
    Last Post: 2003-07-28, 13:43

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×