I have to send a DDMMYYY date from a Date to communicate with an API.
NSDateComponents *dateComponents; NSCalendar *gregorian; NSDate *date;
gregoria
Try this code:
NSDateFormatter* dateFormatter = [[[NSDateFormatter alloc] init] autorelease];
[dateFormatter setLocale:[[[NSLocale alloc] initWithLocaleIdentifier:@"en_US_POSIX"] autorelease]];
[dateFormatter setDateFormat:@"ddMMyyyy"];
NSDate *current = [NSDate date];
NSString *currentstring = [dateFormatter stringFromDate:current]