Java tutorial
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Date; public class Main { /** * @param time * @return */ public static String timeToChange(String time) { SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); return simpleDateFormat.format(new Date(Long.parseLong(time + "000"))); } }