I use date formatter to get new string, but in some cases startDate can be nil.
resultDate = [NSString stringWithFormat:@"%@", [formatter stringFromDate:startDate]];
The currently accepted answer isn't actually right.
stringFromDate does return
nil when you pass it a
The reason your string is "(null)" is because
[NSString stringWithFormat:"%@", nil] returns the string "(null)"