当前位置:网站首页>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>
边栏推荐
- Unity editor expansion - the design idea of imgui
- Find the intersection of line segments
- 二进制转十进制,十进制转二进制
- 使用base64编码传图片
- 【Rust 笔记】08-枚举与模式
- Log4j2 vulnerability recurrence and analysis
- Final review of Database Principles
- [concurrent programming] explicit lock and AQS
- [rust notes] 05 error handling
- [rust notes] 06 package and module
猜你喜欢

22-06-28 Xi'an redis (02) persistence mechanism, entry, transaction control, master-slave replication mechanism

Concurrent programming (V) detailed explanation of atomic and unsafe magic classes

Monotonic stack -503 Next bigger Element II

Redux - learning notes

Vscode, idea, VIM development tool shortcut keys

Unity editor expansion - scrolling list

Jupyter remote server configuration and server startup

Final review of Database Principles
![[updating] wechat applet learning notes_ three](/img/05/958b8d62d3a42b38ca1a2d8631a7f8.png)
[updating] wechat applet learning notes_ three

Monotonic stack -42 Connect rainwater
随机推荐
MySQL three logs
Concurrent programming (VI) ABA problems and solutions under CAS
Talking about: is the HashSet set ordered or disordered /hashset set unique, why can we store elements with the same content
[RPC] RPC remote procedure call
【Rust笔记】02-所有权
MySQL 8
【Rust笔记】05-错误处理
Cesium service deployment, and import and display local 3dfiles data
[concurrent programming] Table hopping and blocking queue
Installation of PHP FPM software +openresty cache construction
使用base64编码传图片
22-06-28 西安 redis(02) 持久化机制、入门使用、事务控制、主从复制机制
[set theory] order relation (total order relation | total order set | total order relation example | quasi order relation | quasi order relation theorem | bifurcation | quasi linear order relation | q
Cesium for unreal quick start - simple scenario configuration
Allocation exception Servlet
[concurrent programming] concurrent tool class of thread
Transmit pictures with Base64 encoding
注解简化配置与启动时加载
Intersectionpicker in osgearth
Dom4j traverses and updates XML