Calendar Date Java Format
D means day of month y means year and m means month of year.
Calendar date java format. String formatted formatter format date. Field manipulation the calendar fields can be changed using three methods. Formatter for displaying and parsing date time objects.
Date date cal gettime. The resulting output is. Few examples to work with calendar apis.
Set add and roll. Simpledateformat works with dates date date calendar gettime. Simpledateformat sdf new simpledateformat yyyy mmm dd hh mm ss.
After that use the string format method to format calendar and display the date. String inactivedate null. Simpledateformat format1 new simpledateformat yyyy mm dd.
Object arrobj date calendar getinstance. Locale locale new locale fr fr. Example 2 1 get current date time.
Set f value changes calendar field f to value. Calendar calendar new gregoriancalendar 2013 0 31. Try inactivedate format1 format date.