title: Convert date to timestamp in iOS
body: <p>How do you convert any given date to milliseconds? For example, 2014-01-23 to timestamp conversion.</p>
  
  <pre><code>NSDate *date = [dateFormatter dateFromString:@"2014-01-23"];
  NSLog(@"date=%@",date);
  NSTimeInterval interval  = [date timeIntervalSince1970];
  NSLog(@"interval=%f",interval);
  NSDate *methodStart = [NSDate dateWithTimeIntervalSince1970:interval];
  [dateFormatter setDateFormat:@"yyyy/mm/dd "];
  NSLog(@"result: %@", [dateFormatter stringFromDate:methodStart]);
  </code></pre>
  
  <p>Output result: 1970/30/01</p>