Here you can find the source of toDateFromTime(String time)
public static Date toDateFromTime(String time)
//package com.java2s; import java.sql.Date; public class Main { public static Date toDateFromTime(String time) { try {//w w w .j a va2 s . com return toDateFromTime(Long.parseLong(time)); } catch (Exception iae) { return null; } } public static Date toDateFromTime(long time) { return new Date(time); } }