Convert Date to Calendar in Java

Description

The following code shows how to convert Date to Calendar.

Example


//from   w ww  .  j av a2  s  .  c  o m
import java.util.Calendar;
import java.util.Date;

public class Main {

  public static void main(String[] args) {
    Calendar calendar = Calendar.getInstance();
    calendar.setTime(new Date());
  }

}




















Home »
  Java Tutorial »
    Date »




Date Get
Date Set
Date Format
Date Compare
Date Convert
Date Calculation
Date Parse
Timezone