当前位置:网站首页>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>
边栏推荐
- [PHP] PHP two-dimensional array is sorted by multiple fields
- Ribbon负载均衡服务调用
- Gd32f3x0 official PWM drive has a small positive bandwidth (inaccurate timing)
- Command line interface of alluxio
- 售前分析
- As promised: Mars, the mobile terminal IM network layer cross platform component library used by wechat, has been officially open source
- DOM document
- 2021年OWASP-TOP10
- ZigBee explain in simple terms lesson 2 hardware related and IO operation
- Leetcode513.找出树的左下角的值
猜你喜欢

【ARM】讯为rk3568开发板buildroot添加桌面应用
![[arm] build boa based embedded web server on nuc977](/img/fb/7dc1898e35ed78b417770216b05286.png)
[arm] build boa based embedded web server on nuc977

pytorch(环境、tensorboard、transforms、torchvision、dataloader)

cartographer_ local_ trajectory_ builder_ 2d

cartographer_ backend_ constraint

SDN based DDoS attack mitigation

Sofa weekly | open source person - Yu Yu, QA this week, contributor this week

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 (,,,,,)
![C# 39. Conversion between string type and byte[] type (actual measurement)](/img/33/046aef4e0c1d7c0c0d60c28e707546.png)
C# 39. Conversion between string type and byte[] type (actual measurement)

Redis usage and memory optimization
随机推荐
cartographer_ pose_ graph_ 2d
使用Jedis监听Redis Stream 实现消息队列功能
About abstact and virtual
写在父亲节前
Project suspension
【PHP】PHP二维数组按照多个字段进行排序
[red team] what preparations should be made to join the red team?
操作符的优先级、结合性、是否控制求值顺序【详解】
Mongodb image configuration method
As promised: Mars, the mobile terminal IM network layer cross platform component library used by wechat, has been officially open source
A new journey
MySQL数据库-01数据库概述
小小面试题之GET和POST的区别
Fedora alicloud source
Daily production training report (16)
ZigBee learning in simple terms lesson 3 external interruption
Secondary bootloader about boot28 Precautions for ASM application, 28035
Owasp-top10 in 2021
Leetcode513. Find the value in the lower left corner of the tree
Written before father's Day