Android examples for java.util:Date Convert
Format 20160311 To 2016/03/11
import android.annotation.SuppressLint; public class Main{ public static String coverToDate(String date) { //example 20160311 return date.substring(0, 4) + "/" + date.substring(4, 6) + "/" + date.substring(6, 8);/*www . ja va2 s . c o m*/ } }