I have datepicker, a button and a label. The label says “Choose your date”, the datepicker is, yeah, a datepicker and the button transfers the date the user picked into the label, like this: “You chose the date 2013-01-18 02:28:58 +0000”.
How can I get the date format to be: “You chose the date 18/01-2013” ??? Without the time and the day/month/year set up?
The code I have in the button IBAction for the transfer to label is:
NSString *words = [[NSString alloc]initWithFormat:@"You chose the date %@", dateSelected];
settDato.text = words;
Use
NSDateFormatter, in your.hhaveThen in
viewDidLoadorinitmethod is bestThen in your
IBAction