There are several ways to create Timestamp in java. The following are currently summarized
- Timestamp time1 = new Timestamp(System.currentTimeMillis());
- Timestamp time2 = new Timestamp(new Date().getTime());
- Timestamp time3 = new Timestamp(Calendar.getInstance().getTimeInMillis());
- //Not recommended for use
- Timestamp time4 = new Timestamp(2011-1900,11,11,11,11,11,0);
Original address:
http://vsp.iteye.com/blog/1253774
Original address:
http://vsp.iteye.com/blog/1253774