Answers for "java convert calendar to date"

2

convert date to calendar java

public static Calendar toCalendar(Date date){ 
  Calendar cal = Calendar.getInstance();
  cal.setTime(date);
  return cal;
}
Posted by: Guest on April-15-2020
1

java calendar class format

SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
Date date = new Date();
System.out.println(dateFormat.format(date)); //2013/10/15 16:16:39
Posted by: Guest on September-24-2020

Code answers related to "java convert calendar to date"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language