在iphone中获取格式化的时间

it2024-03-28  9

参看:http://blog.chinaunix.net/u2/66419/showart_2347823.html

NSDateFormatter *dateFormatter = [[NSDateFormatteralloc] init]; [dateFormatter setDateFormat:@"YYYY年MM月dd日"]; NSString *currentDate = [dateFormatter stringFromDate:[NSDatedate]]; NSLog(@"current date = %@",currentDate);

转载于:https://www.cnblogs.com/tracy-e/archive/2010/10/11/1847739.html

最新回复(0)