public static final String DATE_DASH_FORMAT = "yyyy-MM-dd";
public static final String DATE_FORMAT = "MM/dd/yyyy";
public static String prepareYearMonthDateFromString( String dateStr ){
try
{
Date date = new SimpleDateFormat( DATE_FORMAT , Locale.ENGLISH ).parse( dateStr );
DateFormat formatter = new SimpleDateFormat( DATE_DASH_FORMAT , Locale.getDefault() );
dateStr = formatter.format( date.getTime() );
}
catch( ParseException e )
{
e.printStackTrace();
}
return dateStr;
}