title: Android / Java convert String date to long type
body: <p>I need to convert a string in the format "dd/mm/yyyy", to a long type. In order to pass the value to the calendarProvider in android. </p>
  
  <p>Currently I have:</p>
  
  <pre><code>Calendar calendar = Calendar.getInstance();
  long startEndDate = 0;
  Calendar currentDateInfo = Calendar.getInstance();
  currentDateInfo.set(calendar.get(Calendar.YEAR), calendar.SEPTEMBER, calendar.get(Calendar.DAY_OF_MONTH));
  startEndDate = currentDateInfo.getTimeInMillis();
  </code></pre>
  
  <p>I need:</p>
  
  <pre><code>long startDate = *Some sort of conversion* EditText.getText();
  </code></pre>
  
  <p>I've tried using SimpleDateFormat but i'm having problems getting the correct type back. Any help would be much appreciated. </p>