Java tutorial
//package com.java2s; import java.sql.Date; import java.text.SimpleDateFormat; public class Main { public static String get_date(String args) { // long nowTime=System.currentTimeMillis(); long retime = Integer.valueOf(args).intValue(); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); String date = sdf.format(new Date(retime * 1000)); return date; // System.out.print(date); } }