如何在java中将时间戳转换为时间?

时间:2015-06-26 13:56:16

标签: java time simpledateformat

如何在Java中将MySQL时间戳转换为时间?我尝试使用SimpleDateFormat,但它没有用。

1 个答案:

答案 0 :(得分:0)

public Date getDate(Timestamp timestamp){
    return new Date(timestamp.getTime());
}