Here you can find the source of convertimeStumpToDate2(String time)
public static String convertimeStumpToDate2(String time)
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Locale; public class Main { private final static SimpleDateFormat dateFormater2 = new SimpleDateFormat( "yyyy-MM-dd", Locale.CHINA); public static String convertimeStumpToDate2(String time) { try {//from ww w. j a v a 2s . co m return dateFormater2.format(new Date(toLong(time) * 1000L)); } catch (Exception e) { return null; } } public static long toLong(String obj) { try { return Long.parseLong(obj); } catch (Exception e) { } return 0; } }