Maxime
Maxime

Reputation: 3165

DateTime conversion with Objective C

I have a Date/Time 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

Upvotes: 0

Views: 219

Answers (2)

Dave DeLong
Dave DeLong

Reputation: 243156

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

Upvotes: 4

bioffe
bioffe

Reputation: 6383

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

Upvotes: 0

Related Questions