Java tutorial
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Date; public class Main { public static final SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); public static String getStrTime_ymd(String cc_time) { String re_StrTime = null; SimpleDateFormat sdf = new SimpleDateFormat("yyyy.MM.dd"); long lcc_time = Long.valueOf(cc_time); re_StrTime = sdf.format(new Date(lcc_time * 1000L)); return re_StrTime; } }