以下代码应该从 coredata 实体“ DIncome ”格式化日期戳
但我得到了following error
,我很确定这与这段代码有关。
-“使用'NSDate *'类型的表达式初始化'NSString *'的不兼容指针类型”-
DIncome *dIncome = [dailyIncomeArray objectAtIndex:indexPath.row];
NSDateFormatter *formateDateString = [NSDateFormatter alloc];
[formateDateString setDateFormat:@"MM/dd/yyyy HH:mm:ss"];
NSString *formattedDateString = [formateDateString stringFromDate:dIncome.datestamp];
NSLog(@"%@" "This is your date log", formattedDateString);
非常感谢您的时间和帮助!