Calendar.getTimeInMillis()

Date

Calendar.getTimeInMillis() UTC milliseconds from the epoch
Returns long value showing UTC milliseconds from the epoch
Examples with output
package my_proj;
 
import java.util.Calendar;
 
public class my_first {
public static void main(String[] args) {
Calendar my_cal_d1 = Calendar.getInstance();// created calendar 
System.out.println( my_cal_d1.getTime());
System.out.println( my_cal_d1.getTimeInMillis());
}
}
Output
Thu Mar 05 14:48:00 IST 2020
1583399880500
clear() Date & time tutorials


Subscribe

* indicates required
Subscribe to plus2net

    plus2net.com



    Post your comments , suggestion , error , requirements etc here




    We use cookies to improve your browsing experience. . Learn more
    HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
    ©2000-2021 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer