Here you can find the source of getDate(long timeStamp)
@SuppressLint("SimpleDateFormat") public static String getDate(long timeStamp)
//package com.java2s; import android.annotation.SuppressLint; import java.text.SimpleDateFormat; import java.util.Date; public class Main { @SuppressLint("SimpleDateFormat") public static String getDate(long timeStamp) { try {//from w w w. j a v a2 s. c o m SimpleDateFormat sdf = new SimpleDateFormat("MMM dd, yyyy"); Date netDate = (new Date(timeStamp)); return sdf.format(netDate); } catch (Exception ex) { return ""; } } }