views:

53

answers:

1

How can I parse this into an objective-c object most efficiently?

"2010-07-13T11:22:33-07:00"

This is what I tried

NSDateFormatter *format = [[NSDateFormatter alloc] init];
[format setDateFormat:@"yyyy-MMM-ddTHH:mm:ssZ"];
+4  A: 

What kind of object? I'm going to assume you want that to become an NSDate, in which case you want an NSDateFormatter.

Joshua Weinberg
yes NSDate. How would I use it?
Yolanda
Have you tried it yet?
Joshua Weinberg
yes. couldn't get it to work.
Yolanda
Come on, you can do better than that. WHAT have you tried? Post your code.
Joshua Nozzi
NSDateFormatter *format = [[NSDateFormatter alloc] init];[format setDateFormat:@"yyyy-MMM-ddTHH:mm:ssZ"];
Yolanda