I want to get the current time and date in milliseconds. How can I get this?
I tried this:
Date date=new Date() ; System.out.println(\"Today is \" +dat
Use this code to get the current date and time
DateFormat dateFormat = new SimpleDateFormat("dd:MM:yyyy HH:mm:ss"); Calendar calendar=Calendar.getInstance(); Date date=calendar.getTime(); date.getHours(); date.getMinutes(); date.getMonth(); date.getSeconds(); date.getYear();