Results 1 to 10 of 10
  1. #1
    thirupathik is offline Member
    Join Date
    Jul 2008
    Posts
    4
    Rep Power
    0

    Default How to use SimpleDateFormat in J2ME Applications

    Hi,

    I am getting compilation error while using SimpleDateFormat. I have imported
    java.text.SimpleDateFormat; and java.util.Date , but I don't know what's wrong.

    Can anybody suggest me how to resolve this.

    Thank you very much in advance.

    Thiru

  2. #2
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    Can you tell more about the error you get. No one knows about your error do far, and how to answering to you?

  3. #3
    Join Date
    Jan 2009
    Location
    India
    Posts
    1
    Rep Power
    0

    Default

    hi, i am new to j2me i just want to ask which actions can be performed on fire command in canvas.
    thank you.

  4. #4
    vogash is offline Member
    Join Date
    Mar 2009
    Posts
    10
    Rep Power
    0

    Default

    you can't use it

  5. #5
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    Quote Originally Posted by vogash View Post
    you can't use it
    It's better if you can give much better explanation.

  6. #6
    Levis is offline Member
    Join Date
    Sep 2009
    Posts
    2
    Rep Power
    0

    Default

    Hi everyone, i just started with j2me programming. So need all your support to learn more. Right now just created a small program for email login. Please help me how to compare between the strings entered by the user for all the fields and if it does not match ,clear all the fields back to normal.please help me.

  7. #7
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    Not much clear what's you question is, what you want to compare with?

    In general, for string comparison equal method used, that == sign. Just doing a equal test using == sign not make sense at all. And also, once you do the validation in any way, if you want to make back to the original state we can do several things, clean-up all the control entries one of them. If you want to find a better answer on this please ask your question more clearly.

    Good luck! :)

  8. #8
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    You can do something like this,

    Java Code:
         DateFormat dateFormat = new SimpleDateFormat("dd-MMM-yy");
         Date date = (Date)dateFormat.parse("11-June-07");
         String s = dateFormat.format(date);
         System.out.println(s);

  9. #9
    ishiohara is offline Member
    Join Date
    Aug 2010
    Posts
    1
    Rep Power
    0

    Default

    Are you sure Eranga?
    I think don't exists SimpleDateFormat in J2ME

  10. #10
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,184
    Rep Power
    19

    Default

    Aw, c'mon. This thread's more than 2 years old.

    But yes, SDF doesn't exist in Java ME.

    db

Similar Threads

  1. Using SimpleDateFormat
    By Java Tip in forum Java Tip
    Replies: 1
    Last Post: 07-18-2008, 08:33 AM
  2. Launching applications without an IDE
    By this_is_phil in forum New To Java
    Replies: 6
    Last Post: 05-24-2008, 07:54 AM
  3. Including JAR in applications
    By bugger in forum New To Java
    Replies: 0
    Last Post: 01-11-2008, 09:36 AM
  4. Concurrent Applications
    By m@tqi in forum Advanced Java
    Replies: 1
    Last Post: 12-01-2007, 12:09 AM
  5. J2me
    By kuttyniti@gmail.com in forum Sun Java Wireless Toolkit
    Replies: 0
    Last Post: 11-24-2007, 06:27 AM

Posting Permissions

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