Here you can find the source of convertDateTime( String YearMonthDayHourMinuteSeconds)
@SuppressLint("SimpleDateFormat") public static String convertDateTime( String YearMonthDayHourMinuteSeconds)
//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 convertDateTime( String YearMonthDayHourMinuteSeconds) { String txtDate = ""; String expectedPattern = "yyyy-MM-dd HH:mm:ss"; SimpleDateFormat formatter = new SimpleDateFormat(expectedPattern); Date date;/*from w ww . j av a2s. c om*/ try { date = formatter.parse(YearMonthDayHourMinuteSeconds); DateFormat df = new SimpleDateFormat("MMMM dd,yyyy @ HH:mm"); txtDate = df.format(date); } catch (Exception e) { } return txtDate; } }