1. 程式人生 > >mysql的DateDiff函式查詢兩個日期的差的函式用於算兩個日期的差距

mysql的DateDiff函式查詢兩個日期的差的函式用於算兩個日期的差距

例子
<!-- 查詢開標時間在的當天內的招標專案-->
<select id="queryBidopenToday" resultMap="BaseResultMap" >
   select
   <include refid="Base_Column_List" />
   from cpu_bid_project
   where dr=0
   and enterprise_id= #{enterpriseId,jdbcType=BIGINT}
   and DateDiff(bid_open_time,now())=0
</select>