Here you can find the source of GetDate(long milliseconds)
public static Date GetDate(long milliseconds)
//package com.java2s; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; public class Main { public static Date GetDate(long milliseconds) { return new Date(milliseconds); }// ww w .j a v a 2s. c om public static Date GetDate(String time) { SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); try { return sdf.parse(time); } catch (ParseException e) { return new Date(); // e.printStackTrace(); } } }