开发者

DateTime conversion with Objective C

开发者 https://www.devze.com 2023-03-07 03:33 出处:网络
I have a Date/T开发者_JAVA百科ime they come from a Apache server in this format : 2011-05-20T14:21:00.103-04:00

I have a Date/T开发者_JAVA百科ime they come from a Apache server in this format :

2011-05-20T14:21:00.103-04:00

How I can convert this Date/Time to NSDate...

Thanks


Use an NSDateFormatter. You'll need to specify the dateFormat, and the patterns you can use are available here.


[NSDate dateWithString:@"2011-05-20T14:21:00.103-04:00"];
0

精彩评论

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