I have to send a DDMMYYY date from a Date to communicate with an API.
NSDateComponents *dateComponents; NSCalendar *gregorian; NSDate *date;
gregoria
Agree With Ruben Esposito
Just change your code like this.
NSDateFormatter *dtFormatter = [[NSDateFormatter alloc]init];
[dtFormatter setDateFormat:@"ddMMyyyy"];
NSString *strDate = [NSString stringWithFormat:@"%@",[dtFormatter stringFromDate:[NSDate date]]];
[dtFormatter release];
NSLog(@"%@",strDate);