Skip to content Skip to sidebar Skip to footer

How To Display First Three Letters Of The Month In Android Datepicker

In date Picker I tried to get month in letter others are in integer It's returning full name of the month. But i want first threes letters of the month. i tried: SimpleDateFormat

Solution 1:

Use MMM, like this SimpleDateFormat("yyyy-MMM-dd ")

Solution 2:

Try the following code.Hopefully this will work...

Calendar cal=Calendar.getInstance();
SimpleDateFormatmonth_date=newSimpleDateFormat("MMM");
Stringmonth_name= month_date.format(cal.getTime());

Post a Comment for "How To Display First Three Letters Of The Month In Android Datepicker"