开发者

How can i convert NSString to NSDate?

How can i convert NSString to NSDate?

from these Strings:

    NSString *year = @"2010";
NSString *month = @"3开发者_JS百科";
NSString *day = @"12";

to change UIDatePicker.Thanks


NSDateFormatter can turn a string into a date. You create an NSDateFormatter object, set its format using setDateFormat: and then use its dateFromString: method to convert a string into a date.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜