Java examples for Date Time:Calendar
Get time in milliseconds using Calendar
import java.util.Calendar; public class Main { public static void main(String[] args) { Calendar now = Calendar.getInstance(); System.out.println("Current milliseconds since Jan 1, 1970 are :" + now.getTimeInMillis()); }/* w ww .j a v a2 s . c o m*/ }