Java tutorial
public class Main { public static void main(String[] args) { java.util.Date today = new java.util.Date(); java.sql.Timestamp ts1 = new java.sql.Timestamp(today.getTime()); long tsTime1 = ts1.getTime(); System.out.println(tsTime1); } }