开发者

How to store parsed date value as date format in mutable array as mutable dictionary in iphone?

开发者 https://www.devze.com 2022-12-21 04:59 出处:网络
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 ar

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


  1. Create an instance of NSDateFormatter.
  2. Configure the date formatter so that it understands the format you want it to parse (setDateFormat:, setTimeFormat:).
  3. Call the date formatter's -dateFromString: method.
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号