当前位置:网站首页>Notes and bugs generated during the use of h:i:s and y-m-d
Notes and bugs generated during the use of h:i:s and y-m-d
2022-07-03 08:46:00 【The luckier~】


When the selected dates are 2022-02-09 Make screening conditions when , There's no data , The parameters passed to the backend here are “2022-02-09 00:00:00”,“2022-02-09 00:00:00”, In this way, the screening range is very narrow . Because the back-end code is accurate to seconds
Here are some Wrong writing .
The back-end code is accurate to seconds
// The back-end code is accurate to seconds --- Wrong writing
<if test="applyStartTime != null and applyEndTime != null">
<![CDATA[
and DATE_FORMAT(t.apply_time
, '%Y-%m-%d %H:%i:%s') >= DATE_FORMAT(#{
applyStartTime}
, '%Y-%m-%d %H:%i:%s')
and DATE_FORMAT(t.apply_time
, '%Y-%m-%d %H:%i:%s') <= DATE_FORMAT(#{
applyEndTime}
, '%Y-%m-%d %H:%i:%s')
]]>
</if>
Here are some Correct code slice .
It can only be accurate to the number of days
<if test="applyStartTime != null and applyEndTime != null">
<![CDATA[
and DATE_FORMAT(t.apply_time
, '%Y-%m-%d') >= DATE_FORMAT(#{
applyStartTime}
, '%Y-%m-%d')
and DATE_FORMAT(t.apply_time
, '%Y-%m-%d') <= DATE_FORMAT(#{
applyEndTime}
, '%Y-%m-%d')
]]>
</if>
边栏推荐
- URL backup 1
- Creation and content of mapnode -- osgearth rendering engine series (2)
- 22-06-28 西安 redis(02) 持久化机制、入门使用、事务控制、主从复制机制
- 梯度下降法求解BP神经网络的简单Demo
- [concurrent programming] atomic operation CAS
- Concurrent programming (VI) ABA problems and solutions under CAS
- [public key cryptography] ECC elliptic cryptosystem (implementing ElGamal encryption method)
- 100 GIS practical application cases (78) - Multi compliance database design and data warehousing
- Unity editor expansion - scrolling list
- Eating fruit
猜你喜欢

分配异常的servlet

Annotations simplify configuration and loading at startup
![[rust notes] 02 ownership](/img/f7/74f8ea3bd697957f9ebfa3e1513fda.png)
[rust notes] 02 ownership

Unity editor expansion - controls, layouts

Alibaba canaladmin deployment and canal cluster Ha Construction

JS ternary operator - learning notes (with cases)

Chocolate installation

UE4 source code reading_ Bone model and animation system_ Animation node

Monotonic stack -503 Next bigger Element II

Simple demo of solving BP neural network by gradient descent method
随机推荐
Allocation exception Servlet
注解简化配置与启动时加载
Markdown directory generation
Animation_ IK overview
Concurrent programming (VI) ABA problems and solutions under CAS
Redis cluster series 4
了解小程序的笔记 2022/7/3
[concurrent programming] consistency hash
【Rust笔记】02-所有权
Unity learning notes
ES6 promise learning notes
Explain sizeof, strlen, pointer, array and other combination questions in detail
Deep parsing JVM memory model
【Rust笔记】05-错误处理
Cesium for unreal quick start - simple scenario configuration
[cloud native] introduction and use of feign of microservices
Query XML documents with XPath
【Rust 笔记】12-闭包
Unity editor expansion - draw lines
Gradle's method of dynamically modifying APK package name