I used
SimpleDateFormat formatter = new SimpleDateFormat("dd.MM.yyyy, HH:mm"); String time = formatter.format(new Date());
to get t
Use your date object and call date.getTime()
date.getTime()