NSDate *date=[NSDate date];
NSDateFormatter *formatter=[[NSDateFormatter alloc]init];
[email protected]"yyy-MM-dd HH:mm:ss";
NSString *str=[formatter stringFromDate:date];
字符串转化时间
NSString *[email protected]“2011/02/10 18:34”;
NSDateFormatter *formatter=[[NSDateFormatter alloc]init];
[email protected]"yyy-MM-dd HH:mm:ss";
NSDate *date=[formatter dateFromString:date];
时间: 2024-12-28 01:14:51