I have a UIDatePicker which spits the selected date to a label using the following:
-(void)updateLabel:(id)sender {
NSDateFormatter *df = [[NSDateFormatter alloc] init];
df.dateStyle = NSDateFormatterLongStyle;
df.timeStyle = NSDateFormatterMediumStyle;
self.dateLabel.textColor = [UIColor darkGrayColor];
self.dateLabel.text = [NSString stringWithFormat:@"%@",[df stringFromDate:self.datePicker.date]];
}
Using df.timeStyle = NSDateFormatterLongStyle, which seems to be the only option which includes timezone I get this output:
March 5, 2016, at 2:37:33 PM, MST
However, I don't want the seconds there. This is the output I am trying to achieve:
Match 5, 2016 at 2:37PM, MST
Can someone help a brother out!