How to convert Java.util.Date to Calendar?

Dear Experts,

I'm trying to convert a Java.util.Date to a Calendar.  Apparently, the ...Date is being deprecated in favor of Calendar.  I don't actually have the Date per se.  I have the "milliseconds since 12/1/1970" long value, which apparently forms the basis of Date.  WITHOUT USING DEPRECATED DATE METHODS, is there a way I can convert the long value directly into a Calendar?

Thanks,
BrianMc1958
BrianMc1958Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Ajay-SinghConnect With a Mentor Commented:
use this:


Calender cal = Calendar.getInstance();
cal.setTimeInMillis(...);
0
 
BrianMc1958Author Commented:
All right!
--BrianMc1958
0
All Courses

From novice to tech pro — start learning today.