Here you can find the source of timestamp(Timestamp timestamp)
public static long timestamp(Timestamp timestamp)
//package com.java2s; //License from project: Open Source License import java.sql.Timestamp; public class Main { public static long timestamp(Timestamp timestamp) { if (timestamp == null) return 0; return timestamp.getTime(); }//from ww w . ja v a2 s . c om public static Timestamp timestamp(long time) { if (time == 0) return null; return new Timestamp(time); } }