Posted By

vaishnavi on 12/09/10


Tagged

date formatter


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

vaishnavi
cnathan


Date formatter


 / Published in: Objective C
 

  1. NSDateFormatter *formatter;
  2. NSString *dateString;
  3.  
  4. formatter = [[NSDateFormatter alloc] init];
  5. [formatter setDateFormat:@"dd-MM-yyyy HH:mm"];
  6.  
  7. dateString = [formatter stringFromDate:[NSDate date]];
  8.  
  9. [formatter release];

Report this snippet  

You need to login to post a comment.