Set date and desired time in Android
<p>I want to set date and time in my android app. The date should be today's date but the time should be set to 6:00 AM by default in the text field. I have read many links but most of them shows today's time and date (example: 2016-03-28 11:53:55).</p>

<pre><code> String timetxt1 = "06:00:00";
 Date datetxt1 = null;;
 try {
     datetxt1 = simpleDateFormat.parse(timetxt1);
 } catch (ParseException e) {
     e.printStackTrace();
 }
 Calendar selectedDate1 = Calendar.getInstance();
 selectedDate1.setTime(datetxt1);

 edittxt.setText(dateFormatter.format(selectedDate1.getTime()));
</code></pre>