ITeye博客

mybatis日期配置DATE,jstl用fmt:formatDate出现的日期格式问题

MatthewMay · 2014-03-13 14:03 · jstl · 编程语言 · JSTL · Markdown

mybatis 中

    <result column="CRETE_TIME" property="createTime" jdbcType = "TIMESTAMP" />

用fmt:formatDate标签在Jsp显示日期和时间
为什么日期显示的是正确的,但是时间显示总是12:00:00

解决:方法一:去掉jdbcType = "TIMESTAMP"

方法二:

mybatis jdbcType: DATE ,TIMESTAMP 区别:

1. mybatis中 jdbcType 时间类型

当jdbcType = DATE 时, 只传入了 年月日

jdbcType = TIMESTAMP ,  年月日+ 时分秒

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。