I have to send a DDMMYYY date from a Date to communicate with an API.
NSDateComponents *dateComponents; NSCalendar *gregorian; NSDate *date;
gregoria
Try this
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; [dateFormatter setDateFormat:@"ddMMyyyy"]; NSString *textDate = [NSString stringWithFormat:@"%@",[dateFormatter stringFromDate:[NSDate date]]]; NSLog(@"Date %@",textDate); [dateFormatter release];