在iphone中获取格式化的时间
2010-10-11 11:21 Tracy E 阅读(635) 评论(0) 编辑 收藏 举报参看: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);