I want to convert:
Tue Mar 28 12:00:00 IST 2016 time format
INTO
Tue Mar 28 00:00:00 IST 2016
How can I do it?
=================
Actually
In the database, my date is saved with the format of "Tue Mar 28 00:00:00 IST 2016", I want to fetch this record using this date.but my following code
Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
calendar.set(Calendar.HOUR, 0);
calendar.set(Calendar.MINUTE, 0);
calendar.set(Calendar.SECOND, 0);
calendar.clear(Calendar.MILLISECOND);
return calendar.getTime();
but this is giving me Tue Mar 28 12:00:00 IST 2016, whereas I want Mar 28 00:00:00 IST 2016, So that it would be same as Database one, and will fetch.