-6

Possible Duplicate:
format a NSDate to DDMMYYYY?
Want NSDateformatter for January,2000 or January 2000

I need date and time in following format. How can I get ..

Dec 17,2012 5:30 AM

Cœur
  • 37,241
  • 25
  • 195
  • 267

2 Answers2

0

You can always google for these kind of issues

Try to look at NSDateFormatter Class,
The format you are looking for is something like:

 [dateFormatter setDateFormat:@"MMM dd,yyy hh:mm:ss a"]; //dateFormatter is an object of class NSDateFormatter
superGokuN
  • 1,399
  • 13
  • 28
0
    NSDate *selected_Date = //Your Date object here;
    NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init];
    [dateFormat setDateFormat:@"MMM dd,yyy hh:mm:ss a"];
    NSString* strDateObj [NSString stringWithFormat:@"%@",[dateFormat stringFromDate:selected_Date]];
    NSLog(@"Date %@",)
iDhaval
  • 7,824
  • 2
  • 21
  • 30