当前位置:网站首页>MONTHS_ Between function use
MONTHS_ Between function use
2022-06-27 22:05:00 【Technical column of qingpingle】
MONTHS_BETWEEN (date1, date2)
Used to calculate date1 and date2 Between a few months . date1-date2
-- Every other month : Time format Result with decimal 16.516
SELECT MONTHS_BETWEEN('2022-05-28','2021-01-12')
-- Every other month : Month format Result integer :16
-- Method 1 : Splicing
SELECT MONTHS_BETWEEN(CONCAT(SUBSTR('2022-05-28',1,7),'-01'),
CONCAT(SUBSTR('2021-01-01',1,7),'-01'))
-- Method 2 : Intercept
SELECT CONCAT(SPLIT(MONTHS_BETWEEN('2022-05-28','2021-01-12') ,"\\.")[0])
-- Every other month : rounding 17
SELECT ROUND(MONTHS_BETWEEN('2022-05-28','2021-01-12') ,0)
-- Every other month , Round forward 16
SELECT FLOOR(MONTHS_BETWEEN('2022-05-28','2021-01-12') )
-- Every other month , Round back 17
SELECT CEIL(MONTHS_BETWEEN('2022-05-28','2021-01-12') )
-- With Chinese character format :1 Years and 1.0 Months
SELECT CONCAT(SPLIT(MONTHS_BETWEEN('2019-03-31','2018-02-28')/12,"\\.")[0]," Years and ",ROUND(MONTHS_BETWEEN('2019-03-31','2018-02-28')%12,1)," Months ");
边栏推荐
- 软件缺陷管理——测试人员必会
- 管理系统-ITclub(下)
- Gbase 8A OLAP analysis function cume_ Example of dist
- Open source technology exchange - Introduction to Chengying, a one-stop fully automated operation and maintenance manager
- 真香,自从用了Charles,Fiddler已经被我彻底卸载了
- 读写分离-Mysql的主从复制
- GBase 8a的create database 会被查询耗时很长怀疑卡住的现象分析
- A method of go accessing gbase 8A database
- [leetcode] 508. Élément de sous - arbre le plus fréquent et
- Experience sharing of meituan 20K Software Test Engineers
猜你喜欢
![[LeetCode]动态规划解分割数组I[Red Fox]](/img/b2/df87c3138c28e83a8a58f80b2938b8.png)
[LeetCode]动态规划解分割数组I[Red Fox]

使用Fiddler模拟弱网测试(2G/3G)

BAT测试专家对web测试和APP测试的总结

The create database of gbase 8A takes a long time to query and is suspected to be stuck

Luogu p5706 redistributing fertilizer and house water

单元测试界的高富帅,Pytest框架,手把手教学,以后测试报告就这么做~

STM32F107+LAN8720A使用STM32cubeMX配置网络连接+tcp主从机+UDP app

管理系統-ITclub(下)
How to design an elegant caching function

AQS SOS AQS with me
随机推荐
豆沙绿保护你的双眼
Common methods of string class
使用Jmeter进行性能测试的这套步骤,涨薪2次,升职一次
[leetcode] dynamic programming solution split integer i[silver fox]
Bean paste green protects your eyes
Set code exercise
Use Fiddler to simulate weak network test (2g/3g)
GBase 8a的create database 会被查询耗时很长怀疑卡住的现象分析
GBase 8a V8版本节点替换期间通过并发数控制资源使用减少对系统影响的方法
[sword offer ii] sword finger offer II 029 Sorted circular linked list
年薪50W+的测试大鸟都在用这个:Jmeter 脚本开发之——扩展函数
Interval DP of Changyou dynamic programming
MONTHS_BETWEEN函数使用
北京邮电大学|用于成本和延迟敏感的虚拟网络功能放置和路由的多智能体深度强化学习
Software test automation test -- interface test from entry to proficiency, learn a little every day
单元测试界的高富帅,Pytest框架,手把手教学,以后测试报告就这么做~
Remote invocation of microservices
管理系统-ITclub(上)
Test birds with an annual salary of 50w+ are using this: JMeter script development -- extension function
xpath