I changed the code so that it simply deleted the date and time from the NSDate object without changes:
NSDate* date = [NSDate date]; NSString* datePart = [NSDateFormatter localizedStringFromDate: date dateStyle: NSDateFormatterShortStyle timeStyle: NSDateFormatterNoStyle]; NSString* timePart = [NSDateFormatter localizedStringFromDate: date dateStyle: NSDateFormatterNoStyle timeStyle: NSDateFormatterShortStyle]; NSLog(@"Month Day: %@", datePart); NSLog(@"Hours Min: %@", timePart);
Daniel T.
source share