You can use below function:
-(NSDate *)getDateFromString:(NSString *)pstrDate
{
NSDateFormatter *df1 = [[[NSDateFormatter alloc] init] autorelease];
[df1 setDateFormat:@"yyyy-MM-dd'T'HH:mm:ssZ"];
NSDate *dtPostDate = [df1 dateFromString:pstrDate];
return dtPostDate;
}
Hope, it will be helpful to you.
This function will accept your string date and return the NSDate value.
Cheers!