您的位置:首页 > 其它

hibernate中日期条件查询问题setDate,setTimestamp

2016-02-25 20:57 281 查看
查询列表中需要用日期作为条件查询,如:startDate 和 endDate

程序中需要将startDate转成当日最早的时间 如:2016-02-02 00:00:00 ,endDate转成当日最迟日期,如:2016-02-02 23::59:59且需要用setTimestamp

setDate会截取时分秒

setTime会截取日期

setTimestamp会完整保留 yyyy-MM-dd hh:mm:ss
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: