title: Convert date in long format to NSDate in iOS?
body: <p>Iam getting date as "1425551087194" its in long format .How can i convert that into NSDate and display normal "mm-dd-yyyy" format.</p>
  
  <p>I have tried following codes and output also added here</p>
  
  <p>method 1:</p>
  
  <pre><code>    NSString * timeStampString =@"1425551087194";
      NSTimeInterval _interval=[timeStampString longLongValue];
      NSDate *date = [NSDate dateWithTimeIntervalSinceNow:_interval];
      NSDateFormatter *_formatter=[[NSDateFormatter alloc]init];
      [_formatter setDateFormat:@"dd.MM.yyyy"];
      NSString *_date=[_formatter stringFromDate:date];
      NSLog(@"%@",_date);
  </code></pre>
  
  <p>out put is :07.02.47189</p>
  
  <p>Method 2: </p>
  
  <pre><code>NSString * timeStampString =@"1425551087194";
  NSTimeInterval _interval=[timeStampString longLongValue];
  NSDate *date = [NSDate dateWithTimeIntervalSince1970:_interval];
  NSDateFormatter *_formatter=[[NSDateFormatter alloc]init];
  [_formatter setDateFormat:@"dd.MM.yyyy"];
  NSString *_date=[_formatter stringFromDate:date];
  NSLog(@"%@",_date);
  </code></pre>
  
  <p>output is :08.12.47143</p>
  
  <p>Please help 
  Expecting output is current date.</p>