Results 1 to 3 of 3

Thread: Displaying date

  1. #1
    Manfizy's Avatar
    Manfizy is offline Senior Member
    Join Date
    Nov 2008
    Location
    Germany
    Posts
    193
    Rep Power
    7

    Post Displaying date

    Hi pple,
    I just encountered a problem while trying to display date
    Am using
    Date time = new Date();
    and displaying it on a lable like this
    jLabel3.setText(new Date().toString());
    The date is displayed like this
    Tue Jul 14 08:00:09 CEST 2009
    But i want it displayed like
    Tue July 2009 14 08:00:09
    Is this possible and if yes how can i do it?

    cheerz!
    We Learn Through Mistakes..,
    Manfizy:rolleyes:

  2. #2
    hardwired's Avatar
    hardwired is offline Senior Member
    Join Date
    Jul 2007
    Posts
    1,576
    Rep Power
    9

    Default

    Use the SimpleDateFormat class.

  3. #3
    Manfizy's Avatar
    Manfizy is offline Senior Member
    Join Date
    Nov 2008
    Location
    Germany
    Posts
    193
    Rep Power
    7

    Thumbs up

    Thanks alot for your reply,
    I figured it out :)
    We Learn Through Mistakes..,
    Manfizy:rolleyes:

Similar Threads

  1. java.util.Date vs java.sql.Date
    By Jack in forum New To Java
    Replies: 5
    Last Post: 10-28-2010, 03:59 PM
  2. Displaying image in same jsp
    By SreenivasGurramkonda in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 12-08-2008, 07:01 AM
  3. Compare date input to database with current date
    By hungleon88 in forum Advanced Java
    Replies: 2
    Last Post: 11-25-2008, 09:10 AM
  4. Creating a Gregorian Calendar using a Date object gives date - 1
    By prachi_goliwadekar in forum New To Java
    Replies: 1
    Last Post: 05-08-2008, 09:32 PM
  5. Difference between current date and anothe date
    By vijay balusamy in forum New To Java
    Replies: 1
    Last Post: 04-16-2008, 05:15 PM

Posting Permissions

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