Convert UIDatePicker date to readable date


/ Published in: Objective C
Save to your folder(s)



Copy this code and paste it in your HTML
  1. NSDateFormatter *newFormatter = [[[NSDateFormatter alloc] init] autorelease];
  2. [newFormatter setDateStyle:NSDateFormatterShortStyle];
  3. [newFormatter setTimeStyle:NSDateFormatterMediumStyle];
  4. NSString *dateString = [newFormatter stringFromDate:self.dp.date];

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.