Browsing Category:Objective C

Objective C, Programming

Objective C – NSString NSDate Conversion

NSDate convert to NSString:NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];[dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"];NSString *strDate = [dateFormatter stringFromDate:[NSDate date]];NSLog(@"%@", strDate);[dateFormatter release];Result:2010-08-04 16:01:03NSString convert to NSDate:NSDateFormatter *dateFormatter =...
Continue reading
Share