Issue with NSDate from NSDateComponents
问题 i have a string like 2013-03-05T07:37:26.853 and i want to get the Output : 2013-03-05 07:37:26 . I want the final output in NSDate object. i am using below function to convert desire output. and it returning wrong time. - (NSDate *) getDateFromCustomString:(NSString *) dateStr { NSArray *dateStrParts = [dateStr componentsSeparatedByString:@"T"]; NSString *datePart = [dateStrParts objectAtIndex:0]; NSString *timePart = [dateStrParts objectAtIndex:1]; NSArray *dateParts = [datePart