title: how to convert a date dd / mm / yyyy to yyyy-MM-dd HH:mm:ss Android
body: <p>How can I convert a date in dd / mm / yyyy to a format that supports sqlite yyyy-MM-dd'T'HH: mm: ss</p>
  
  <p>for example:</p>
  
  <pre><code>public static String convertStringToData(String stringData)
          throws ParseException {
  
      SimpleDateFormat sdf = new SimpleDateFormat("dd/mm/aaaa");//yyyy-MM-dd'T'HH:mm:ss
      SimpleDateFormat output = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
      Date data = sdf.parse(stringData);
      String formattedTime = output.format(data);
      return formattedTime;
  }
  </code></pre>