我需要将 NSString 与 NSDateFormatter 的 NSString 输出连接起来。我的代码如下。请检查我哪里出错了。我必须将DEST PATH与datestring连接起来。
NSDateFormatter * formatter = [[NSDateFormatter alloc] init];
[formatter setDateFormat:@"dd-MM-yyyy HH-mm"];
NSString * dateString = [formatter stringFromDate:[NSDate date]];
NSString *DEST_PATH=[NSHomeDirectory() stringByAppendingString:@"/Documents/Movie1];
// below is for concatenate
result =[result stringByAppendingString:DEST_PATH];
result=[result stringByAppendingString:dateString];