当前位置:网站首页>SQL query time period content
SQL query time period content
2022-06-26 05:39:00 【Gerald picker Shea】
Ideas
- A certain time period is sent from the front end
startTime(String )-endTime(String )The format is days, excluding hours, minutes and seconds - Writing sql Is to add the time format to the corresponding field
DATE_FORMAT(crh.create_time,'%Y-%m-%d')Specific date ( Free to define ) - Query results : for example 2022-6-8 To 2022-6-10 Time period
- The results include 6-8 0 Point to 6-10 Number 59 branch 59 second
sql
select * from u_user where 1=1
<if test="user.endTime != null and user.endTime != '' and user.startTime != null and user.startTime != ''">
and DATE_FORMAT(crh.create_time,'%Y-%m-%d') >=#{
user.startTime}
and
DATE_FORMAT(crh.create_time,'%Y-%m-%d') <=#{
user.endTime}
</if>
边栏推荐
- BOM document
- SOFA Weekly | 开源人—于雨、本周 QA、本周 Contributor
- The localstorage browser stores locally to limit the number of forms submitted when tourists do not log in.
- 使用Jedis监听Redis Stream 实现消息队列功能
- How Navicat reuses the current connection information to another computer
- pytorch(网络模型)
- REUSE_ALV_GRID_DISPLAY 事件实现(DATA_CHANGED)
- About abstact and virtual
- Leetcode114. Expand binary tree into linked list
- CMakeLists. txt Template
猜你喜欢

REUSE_ALV_GRID_DISPLAY 事件实现(DATA_CHANGED)

Serious hazard warning! Log4j execution vulnerability is exposed!

Ad tutorial series | 4 - creating an integration library file

Fedora alicloud source

慢慢学JVM之缓存行和伪共享

Uni app ceiling fixed style

Redis usage and memory optimization

The State Council issued a document to improve the application of identity authentication and electronic seals, and strengthen the construction of Digital Government

Install the tp6.0 framework under windows, picture and text. Thinkphp6.0 installation tutorial

Ribbon负载均衡服务调用
随机推荐
Redis usage and memory optimization
The parameter field of the callback address of the payment interface is "notify_url", and an error occurs after encoding and decoding the signed special character URL (,,,,,)
Pytorch中自己所定义(修改)的模型加载所需部分预训练模型参数并冻结
循环位移
Mise en file d'attente des messages en utilisant jedis Listening redis stream
Old love letters
A love that never leaves
Cyclic displacement
LeetCode_ Binary search tree_ Simple_ 108. convert an ordered array to a binary search tree
The difference between get and post in small interview questions
RIA想法
劣币驱逐良币的思考
Two step processing of string regular matching to get JSON list
转帖——不要迷失在技术的海洋中
What management systems (Updates) for things like this
The news of thunderbolt
Internship May 29, 2019
Sql查询时间段内容
cartographer_ local_ trajectory_ builder_ 2d
虚拟项目失败感想