Here you can find the source of convertMillsToDateString(long currentTimeMillis)
public static String convertMillsToDateString(long currentTimeMillis)
//package com.java2s; //License from project: Apache License import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; public class Main { public static String convertMillsToDateString(long currentTimeMillis) { DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); Date date = new Date(currentTimeMillis); return formatter.format(date); }// w ww . ja v a 2s. c o m }