Answers for "java calendar"

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
1

java Calendar add time

Calendar calendar = Calendar.getInstance();  
// 15 days ago
calendar.add(Calendar.DATE, -15); 
// After 4 months
calendar.add(Calendar.MONTH, 4);
Posted by: Guest on August-28-2020
-1

java Calender examokes

// Get curremt time and date.
Calendar calendar = Calendar.getInstance();  
System.out.println("The current date is : " + calendar.getTime());
Posted by: Guest on August-28-2020

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language