Convert java.util.Date to GregorianCalendar in Java
Description
The following code shows how to convert java.util.Date to GregorianCalendar.
Example
//from w ww .j a v a 2 s .c o m
import java.util.Date;
import java.util.GregorianCalendar;
public class Main {
public static void main(String[] a) {
Date date = new Date();
GregorianCalendar calendar = new GregorianCalendar();
calendar.setTime(date);
}
}