Java tutorial
//package com.java2s; import android.util.Log; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; import java.util.TimeZone; public class Main { private static String TAG = "SunriseUtil"; public static String getDaysWithoutYear(String srcDate) { SimpleDateFormat parserSDF = new SimpleDateFormat("yyyy-MM-dd"); SimpleDateFormat formater = new SimpleDateFormat("MM/dd"); Date date = null; try { parserSDF.setTimeZone(TimeZone.getTimeZone("UTC")); date = parserSDF.parse(srcDate); } catch (ParseException e) { Log.d(TAG, e.getMessage()); } return formater.format(date); } }