Java tutorial
//package com.java2s; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; public class Main { public synchronized static String formatDisplayActivityDate(String date) { String formattedDateDisplay = ""; SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); Date dateFormat = null; try { dateFormat = sdf.parse(date); } catch (ParseException e) { // TODO Auto-generated catch block e.printStackTrace(); } SimpleDateFormat sdf2 = new SimpleDateFormat("MM/dd/yyyy"); formattedDateDisplay = sdf2.format(dateFormat); String[] dateTimeArray = formattedDateDisplay.split("T"); return formattedDateDisplay; } }