title: Java convert double to date format
body: <p>I have made a little app in ios+firebase, now I am trying to connect android. In ios I save date as double (for example: -242528463.775282), but then I trying to retrieve same double in java it giving me another date.</p>
  
  <p>in IOS - 01.07.2009
  in Java - 29.12.1969</p>
  
  <pre><code>  double myDouble = date;
    long myLong = (long) (myDouble);
    System.out.println(myLong);
  
    Date itemDate = new Date(itemLong);
    String myDateStr = new SimpleDateFormat("dd-MM-yyyy").format(itemDate);             
    editTextDate.setText(myDateStr);
  </code></pre>
  
  <p>Is it possible to convert double to date without converting to long? </p>