I am trying to retrieve the updatedAt section of a parse object and displaying it as a label. I have created a date formatter yet when I convert it to a string it just becomes a null value. Here is the code:
- (void)viewDidLoad {
[super viewDidLoad];
PFQuery *BizarroTime = [PFQuery queryWithClassName:@"Bizarro"];
[BizarroTime getObjectInBackgroundWithId:@"MkoIkCBMdP" block:^(PFObject *Bizarro, NSError *error) {
NSDate *BizarroDate = Bizarro[@"updatedAt"];
NSDateFormatter *df = [NSDateFormatter new];
[df setDateFormat:@"MMMM dd 'at' HH:mm"];
self.BizarroUpdatedAt.text = [df stringFromDate:BizarroDate];
}];
}
Any help with this would be awesome! Thanks!