当前位置:网站首页>Use of Presto date function
Use of Presto date function
2022-04-23 12:57:00 【Look at the data at the top of the mountain】
date_diff(): Find the difference between the two times , Inside are two time stamps , Back - front = Difference value
eg:date_diff('day',from_iso8601_timestamp('2021-12-23'),from_unixtime(ctime/1000)) as gap
): In days
from_iso8601_timestamp(): Convert a date to a timestamp
eg:from_iso8601_timestamp('2021-12-23') =>2021-12-23 00:00:00.000 Asia/Shanghai
from_unixtime(): Format the date
eg:from_unixtime(ctime/1000)) => 2021-12-22 13:54:07.000
date_parse(): Format the date of the string
eg:date_parse(t2.logday,'%Y%m%a')
The original logday yes 20211223, Now it turns into 2021-12-23
select date_parse('20211222', '%Y%m%d'); =>2021-12-22 00:00:00.000
版权声明
本文为[Look at the data at the top of the mountain]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230615025044.html
边栏推荐
- [daily question] chessboard question
- BUUCTF WEB [BUUCTF 2018]Online Tool
- How to click an object to play an animation
- Record a website for querying compatibility, string Replaceall() compatibility error
- 进程虚拟地址空间区域划分
- Date time type in database
- Kubernets Getting started tutoriel
- 梳理網絡IP代理的幾大用途
- Redis deployment of cloud native kubesphere
- 将新增和编辑的数据同步更新到列表
猜你喜欢

免费试用一个月的服务器,并附上教程

Servlet监听器&过滤器介绍

Sort out several uses of network IP agent

22. 括号生成
![Packet capturing and sorting -- TCP protocol [8]](/img/ae/4957a997af725a1bf3f61cb24fc717.png)
Packet capturing and sorting -- TCP protocol [8]

Embrace the new blue ocean of machine vision and hope to open a new "Ji" encounter for the development of digital economy

XinChaCha Trust SSL Organization Validated

Importerror after tensorflow installation: DLL load failed: the specified module cannot be found, and the domestic installation is slow

风尚云网学习-h5的input:type属性的image属性

How to prevent the website from being hacked and tampered with
随机推荐
Golang implements MD5, sha256 and bcrypt encryption
Go language mapping operation
Go language slicing operation
Process virtual address space partition
Go language: passing slices between functions
Softbank vision fund entered the Web3 security industry and led a new round of investment of US $60 million in certik
22. 括号生成
拥抱机器视觉新蓝海,冀为好望开启数字经济发展新“冀”遇
如何防止网站被黑客入侵篡改
31. 下一个排列
[Blue Bridge Cup] April 17 provincial competition brushing training (the first three questions)
leetcode:437. Path sum III [DFS selected or not selected?]
Software testing weekly (issue 68): the best way to solve difficult problems is to wait and see the changes and push the boat with the current.
box-sizing
云原生KubeSphere部署Redis
Buuctf Web [gxyctf2019] no dolls
如何实现点击一下物体播放一次动画
Remote sensing image classification and recognition system based on convolutional neural network
Keyword interpretation and some APIs in RT thread
No idle servers? Import OVF image to quickly experience smartx super fusion community version