title: Making the Subtitle in a Table View a time stamp (Objective C)
body: <p>I am working on an educational task manager and I am wanting to add a Time stamp to the subtitle section of the cell. I have coded the title of the task correctly but I want to replace subtitle with a time stamp of when the task was created. </p>
  
  <p><img src="https://i.stack.imgur.com/kZi5l.png" alt="enter image description here"></p>
  
  <p>I would like to turn where it says Subtitle into a time stamp</p>
  
  <p>Could somebody please help me? Just comment below with the code that I need to add to the Controllers attached to this TableView. Below is my ViewController.h</p>
  
  <pre><code>#import &lt;UIKit/UIKit.h&gt;
  
  @interface ViewController : UIViewController &lt;UITableViewDataSource&gt;
  
  -(IBAction)add:(UIBarButtonItem *)sender;
  @property (nonatomic, strong) NSMutableArray *tasksArray;
  @property (nonatomic, strong) IBOutlet UITableView *tasksTable;
  
  @end
  </code></pre>
  
  <p>and this is my ViewController.m</p>
  
  <pre><code>@interface ViewController ()
  
  @end
  
  @implementation ViewController
  
  @synthesize tasksArray = _tasksArray;
  @synthesize tasksTable = _tasksTable;
  
  - (void)viewDidLoad
  {
      [super viewDidLoad];
      // Do any additional setup after loading the view, typically from a nib.
  
      NSLog(@"Test");
      self.tasksArray = [[NSMutableArray alloc]init];
  }
  
  - (void)didReceiveMemoryWarning
  {
      [super didReceiveMemoryWarning];
      // Dispose of any resources that can be recreated.
  }
  
  -(IBAction)add:(UIBarButtonItem *)sender
  {
          UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@"Enter the task name"          message:nil delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"Add", nil];
  alert.alertViewStyle = UIAlertViewStylePlainTextInput;
  [alert show];
  }
  
  - (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
  {
      NSString *buttonTile = [alertView buttonTitleAtIndex:buttonIndex];
      if ([buttonTile isEqualToString:@"Add"]) {
          [self.tasksArray addObject:[alertView textFieldAtIndex:0].text];
          [self.tasksTable reloadData];
      }
  }
  
  #pragma mark
  #pragma table view
  
  -(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
  {
      return 1;
  }
  
  -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
  {
      return self.tasksArray.count;
  }
  
  -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  {
      static NSString *CellIdentifier = @"Cell";
  
      UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
  
      if (!cell) {
          cell = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault     reuseIdentifier:CellIdentifier];
      }
      cell.textLabel.text = [self.tasksArray objectAtIndex:indexPath.row];
  
      return cell;
  }
  
  @end
  </code></pre>
  
  <p>I am new to StackOverFlow, so don't judge my post if it sucks :p haha! Cheers and please help me!</p>