I am new to iphone deve开发者_如何学运维lopment .I have parsed a xml page and stored the title, date, summary, in a mutable array "stories" as mutable dictionary "object for key".All the values are saved as string But i want to save the Date value as date format.So that i can sort it with date.How can i achieve that.Please help me out.Thanks
- Create an instance of
NSDateFormatter
. - Configure the date formatter so that it understands the format you want it to parse (
setDateFormat:
,setTimeFormat:
). - Call the date formatter's
-dateFromString:
method.
精彩评论