Luc*_*Luc 11 java mysql datetime resultset
我有两列在MySql数据库中存储DateTime值,
当我尝试从Java中的ResultSet中获取它们时,没有选项: getDateTime()
getDateTime()
我应该使用getDate()还是不使用?
getDate()
提前致谢
tmw*_*nik 16
使用getDate()只返回a Date,所以在你的情况下,如果你想要使用日期和时间getTimestamp(String columnLabel)- 这应该工作,也替换String columnLabel为数据库中的实际列名称.
Date
getTimestamp(String columnLabel)
String columnLabel
归档时间:
12 年,6 月 前
查看次数:
29147 次
最近记录:
11 年,8 月 前