I am geting below date from the server now I want to convert string to date.
Wed, 08 Jun 2011 11:58 pm EDT
But I cant success please give me advice.
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
How-To: Convert a string to NSDate
In Objective-C, you commonly nead to convert a string to an
NSDateobject. A simple way to do this is using the NSDateFormatter object. It provides the dateFromString method which converts a string into an NSDate object. You do, however, need to tellNSDateFormatterthe format the date will be in. See below example:And read about EDT – Eastern Daylight Time I think it would be better you change EDT to -0004.