title: Convert the date from Milliseconds format to normal format in ios
body: <p>I am getting the date from database  in Milliseconds format.I am convrting that date in to the normal date format.But it returns wrong date.Once please give me the solution in ios</p>
  
  <p>The date in milliseconds is 1385856000000</p>
  
  <p>After convert that date i am getting 10/26/1970.</p>
  
  <p>But real date is 12/1/2013 .</p>
  
  <p>I am using the following code is</p>
  
  <pre><code>int dobint = [secondChangeDob intValue];
  
              NSTimeInterval timeInSecond = dobint/1000;
  
              NSDate *date = [NSDate dateWithTimeIntervalSince1970:timeInSecond];
  
              NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
              [formatter setDateFormat:@"MM/dd/yyyy"];
              NSString *formattedDate=[formatter stringFromDate:date];
              NSLog(@"Formatted Date : %@",formattedDate);
              NSUserDefaults *dateDef = [NSUserDefaults standardUserDefaults];
              [dateDef setObject:formattedDate forKey:@"bDATE"];
  </code></pre>
  
  <hr>