获取系统当前日期,一定日期格式的代码
NSDate * senddate=[NSDate date];
NSDateFormatter *dateformatter=[[NSDateFormatter alloc] init];
[dateformatter setDateFormat:@"YYYYMMdd"];
NSString * locationString=[dateformatter stringFromDate:senddate];
NSLog(@"locationString:%@",locationString);