Java tutorial
//package com.java2s; import java.text.DateFormat; import java.util.Date; public class Main { static String formatDate(long dateInDays) { Date date = new Date(dateInDays * 24 * 60 * 60 * 1000); return DateFormat.getDateInstance().format(date); } }