[Objective-C] Get current Date and Time

Get current and formatted time from your simulator or !

- (NSString*) getDateTime {
      *formatter;
     NSString        *dateString;
 
     formatter = [[ alloc] init];
     [formatter :@"dd-MM-yyyy HH:mm"];
 
     dateString = [formatter :[NSDate date]];
     [formatter release];

     NSLog(@"Current data: %@", dateString);
     return dateString;
}

eof

Rif: albertopasca.it