I used
SimpleDateFormat formatter = new SimpleDateFormat("dd.MM.yyyy, HH:mm");
String time = formatter.format(new Date());
to get t
Using this method you can Convert your Date Into miliseconds that can be used to add events to the Calender
public Long GettingMiliSeconds(String Date)
{
long timeInMilliseconds = 0;
SimpleDateFormat sdf = new SimpleDateFormat("EEE MMM dd HH:mm:ss z yyyy");
try {
Date mDate = sdf.parse(Date);
timeInMilliseconds = mDate.getTime();
} catch (ParseException e) {
e.printStackTrace();
}
return timeInMilliseconds;
}