Java tutorial
//package com.java2s; //License from project: Apache License import java.text.SimpleDateFormat; import android.annotation.SuppressLint; public class Main { @SuppressLint("SimpleDateFormat") public static String getTime(long date) { SimpleDateFormat format = new SimpleDateFormat("MM-dd HH:mm:ss"); return format.format(date); } }