To get Today's Epoch Time:-
SimpleDateFormat df = new SimpleDateFormat("dd/MM/yyyy");
String _date = df.format(Calendar.getInstance().getTime());
Long notificationID = strDateToUnixTimestamp(_date); //Gives Today Epoch Time.
private static long strDateToUnixTimestamp(String dt) {
DateFormat formatter;
Date date = null;
long unixtime;
formatter = new SimpleDateFormat("dd/MM/yy");
try {
date = formatter.parse(dt);
} catch (ParseException ex) {
ex.printStackTrace();
}
unixtime = date.getTime() / 1000L;
return unixtime;
}
To see the difference between current Time in Millis and Today's in Millis [Date 00:00:00].
Log.i("Notification ID", String.valueOf(notificationID) + ": "+ System.currentTimeMillis()/1000);
Posting SO and it's answer as I googled for few hours and found what i was looking for. Hope it may be helpful to others.