I would like to get the current date in milliseconds with only year, month and date. But when I use this code:
Calendar cal = Calendar.getInstance();
cal.clear(Calendar.HOUR);
cal.clear(Calendar.MINUTE);
cal.clear(Calendar.SECOND);
cal.clear(Calendar.MILLISECOND);
currentDate = cal.getTimeInMillis();
I still get the time in milliseconds with the hour.
How can I fix this?
Be carefull on the timezone of your Calendar.