Convert unix time to Timestamp

0
Hi

I am trying to convert a unix timestamp (a BigDecimal) to a java.sql.Timestamp.

Something like
Timestamp StartDate = new Timestamp(1155852000*1000)

Thanks


Not to worry, I'm using a static methods to achieve this.
Post edited by: leroyg, at: 2006/08/23 11:16
leroyg's picture
4
Joined: Aug 17 2006 - 11:42pm
Last seen: 12 years 9 months ago

2 Answers:

0
If you're using mysql it can do it for you

SELECT FROM_UNIXTIME(timestamp) FROM table
krazik's picture
10
Joined: Nov 1 2006 - 8:52am
Last seen: 12 years 6 months ago
0
If you're using mysql it can do it for you

SELECT FROM_UNIXTIME(timestamp) FROM table
krazik's picture
10
Joined: Nov 1 2006 - 8:52am
Last seen: 12 years 6 months ago
Feedback
randomness