Edit: one other thing: you don't need to have the line NSDate *dateFromString = [[NSDate alloc] init];. Just call NSDate *dateFromString = [dateFormatter dateFromString:fecha];. The date formatter will allocate the date object as it needs to.