Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私はnsstringをnsdateに変換する際に問題に直面しています。
この文字列「Mon、10 Dec 201208:00:00CST」をObjective-cでNSDateに変換する方法
これを試してください
NSString *dateString=@"Mon, 10 Dec 2012 08:00:00 CST"; NSDate *date=[NSDate dateWithNaturalLanguageString:dateString]; NSLog(@"Date is %@",date);
出力:
Date is 2012-12-10 08:00:00 -0600