I know, how to convert a Timestamp
to a long, with the getTime()
method.
Is there a method that convert a long
to a TimeStamp
?
I know, how to convert a Timestamp
to a long, with the getTime()
method.
Is there a method that convert a long
to a TimeStamp
?
The constructor is doing that:
Timestamp(long time)
See: Timestamp.Timestamp(long)
:
new Timestamp(someLong)
Yes, there's a constructor for Timestamp that takes a long as a parameter. http://docs.oracle.com/javase/6/docs/api/java/sql/Timestamp.html#Timestamp(long)