Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Jan 2010

    Question How to: String to Date


    I need help to convert a date-time string to proper Date-Time object.

    The String Date format is like this -
    Fri, 29 Jan 2010 01:20:04 +0000
    Actually, all RSS feeds (XML) gives this kind of date.

    I need to get the exact Date and Time from this string without using any extra imports.

  2. #2
    Super Contributor
    Join Date
    Jun 2003
    Cheshire, UK

    Re: How to: String to Date

    I'm afraid you will need to split the String into its individual fields, and set the fields of a Calendar object. Remember to set all the fields (including milliseconds), or the Calendar might fill in with the current time.


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. retrieving Date from String - AS3/Flash Lite
    By neil09 in forum [Archived] Flash Lite on Nokia Devices
    Replies: 2
    Last Post: 2009-04-13, 11:31
  3. C++ 學習程序2
    By hanwen813 in forum [Archived] Other Programming Discussion 关于其他编程技术的讨论
    Replies: 32
    Last Post: 2009-04-02, 09:10
  4. convert Date object to string
    By artemg in forum Mobile Java General
    Replies: 4
    Last Post: 2006-03-03, 04:56
  5. Personal
    By JSmith77 in forum PersonalJava
    Replies: 4
    Last Post: 2003-07-30, 12:52

Posting Permissions

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