<?xml version="1.0" encoding="UTF-8" ?><!DOCTYPE mapperPUBLIC "-//mybatis.org//DTD mapper 3.0//EN""http://mybatis.org/dtd/mybatis-3-mapper.dtd"><mapper namespace="com.cn.dao.NewOperDaoMapper"><!-- 發(fā)布新聞 --><insert id="addNews">insert into NEWS(TITLE,CONTENT,RELEASETIME,AUTHOR) values(#{newsTitle},#{content},to_date(#{realeaseDate},'yyyy-MM-dd'),#{authorName})</insert></mapper>請(qǐng)問(wèn)to_date(#{realeaseDate},'yyyy-MM-dd') 這樣寫(xiě)錯(cuò)在哪里嗎?
我想數(shù)據(jù)庫(kù)的Date類(lèi)型的字段只顯示年月日,不顯示00:00:00時(shí)分秒,請(qǐng)問(wèn)怎么處理?
達(dá)令說(shuō)
2023-03-18 18:14:44