Here you can find the source of getTimeString(long timelnMillis)
public static String getTimeString(long timelnMillis)
//package com.java2s; //License from project: Apache License import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; public class Main { public static String getTimeString(long timelnMillis) { Calendar calendar = Calendar.getInstance(); calendar.setTimeInMillis(timelnMillis); Date date = calendar.getTime(); SimpleDateFormat f = new SimpleDateFormat("yyyy-MM-dd"); String newTypeDate = f.format(date); return newTypeDate; }/* ww w .ja v a 2 s . c o m*/ }