How to change long variable to Timestamp in java?
Do you know how to change a long variable to Timestamp variable ? I can convert it开发者_高级运维 to a String but I need to convert it to Timestamp in order to use it in the database.
Probably something like (assuming millis is your long variable, and represents milliseconds):
Timestamp ts = new Timestamp(millis)
http://download.oracle.com/javase/1.4.2/docs/api/java/sql/Timestamp.html
This question is better suited for stackoverflow though, I'm flagging it.
精彩评论