Tuesday, March 12, 2002 03:27 AM
When you use the default constructor of java.util.Date
, it is initialized to the current date. From that point if you want a java.sql.Timestamp
you can convert by using the long
representation of the date.
So the following instruction should do it :
Timestamp myTimestamp = new Timestamp( new java.util.Date().getTime() );