after selecting the date from the date picker, i am getting the date in the format in view like yy/mm/dd .
i want to the date format in my view like mm/dd/yy. how can i do this.
after selecting the date from the date picker, i am getting the date in the format in view like yy/mm/dd .
i want to the date format in my view like mm/dd/yy. how can i do this.
You can use the following snippet to convert the date to the format you desire. Note that month use uppercase 'MM' in the format:
[dateFormatter setDateFormat:@"MM/dd/yy"];
dateString = [dateFormatter stringFromDate:theDate];
For a full list of the formats available, have a look at the Unicode Standard. With a few minor exceptions, these formats are all supported on the iPhone.