Here you can find the source of convertDate(String YearMonthDay)
@SuppressLint("SimpleDateFormat") public static String convertDate(String YearMonthDay)
//package com.java2s; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; import android.annotation.SuppressLint; public class Main { @SuppressLint("SimpleDateFormat") public static String convertDate(String YearMonthDay) { String txtDate = ""; String expectedPattern = "yyyy-MM-dd"; SimpleDateFormat formatter = new SimpleDateFormat(expectedPattern); Date date;/*from w w w .j a va2 s . co m*/ try { date = formatter.parse(YearMonthDay); DateFormat df = new SimpleDateFormat("MMMM dd,yyyy"); txtDate = df.format(date); } catch (Exception e) { } return txtDate; } }