Here you can find the source of time2Date(Long time)
public static String time2Date(Long time)
//package com.java2s; //License from project: Apache License import java.text.SimpleDateFormat; public class Main { public static String time2Date(Long time) { SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); if (time != null) { String date = format.format(time); return date; }//from w ww . ja va2 s . c o m return null; } }