Check out example codes for "java calendar class format". It will help you in understanding the concepts better.

Code Example 1

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

Learn ReactJs, React Native from akashmittal.com