ios将时间戳转为时间(NSString)

NSDateFormatter* formatter=[[NSDateFormatter alloc]init];

formatter.dateFormat=@"yyyy-MM-dd";

NSDate *date = [NSDate dateWithTimeIntervalSince1970:user.baby_birthday];

NSString* birthString=[formatter stringFromDate:date];

self.birthday = birthString;

你可能感兴趣的:(ios将时间戳转为时间(NSString))