Results 1 to 5 of 5
  1. #1
    nn12 is offline Member
    Join Date
    Sep 2008
    Posts
    85
    Rep Power
    0

    Default String to date conversion

    Hi, In the database the date is stored as a string in the following format i.e 23rd Nov 2009. How do I convert this into date object

  2. #2
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    10

    Default

    SimpleDateFormat See the API docs.

  3. #3
    mine0926 is offline Senior Member
    Join Date
    Apr 2010
    Location
    Philippines
    Posts
    580
    Rep Power
    6

    Default

    Use Date and SimpleDateFormat.
    This might be helpful JTextField and SimpleDateFormat

  4. #4
    nn12 is offline Member
    Join Date
    Sep 2008
    Posts
    85
    Rep Power
    0

    Default

    would it take care of rd in 23rd or th in 16th?

  5. #5
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    10

Similar Threads

  1. converting string (GMT date) to date in US time.
    By JRuyechan in forum New To Java
    Replies: 1
    Last Post: 10-15-2010, 07:07 AM
  2. convert String date to Date
    By computerbum in forum New To Java
    Replies: 7
    Last Post: 09-18-2010, 03:26 PM
  3. Replies: 7
    Last Post: 11-03-2009, 03:18 AM
  4. string conversion??
    By j2vdk in forum New To Java
    Replies: 13
    Last Post: 09-19-2008, 03:35 PM
  5. String to Date conversion
    By javaplus in forum New To Java
    Replies: 2
    Last Post: 11-06-2007, 08:16 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
  •