当前位置:网站首页>presto日期函数的使用
presto日期函数的使用
2022-04-23 06:15:00 【山顶看数据】
date_diff():求出两个时间的差值,里面的放的是两个时间戳,后面-前面=差值
eg:date_diff('day',from_iso8601_timestamp('2021-12-23'),from_unixtime(ctime/1000)) as gap
):以天为单位
from_iso8601_timestamp():将一个日期转换为时间戳
eg:from_iso8601_timestamp('2021-12-23') =>2021-12-23 00:00:00.000 Asia/Shanghai
from_unixtime():将日期进行格式化
eg:from_unixtime(ctime/1000)) => 2021-12-22 13:54:07.000
date_parse():将字符串的日期进行格式化
eg:date_parse(t2.logday,'%Y%m%a')
原来的logday是20211223,现在事解析成2021-12-23
select date_parse('20211222', '%Y%m%d'); =>2021-12-22 00:00:00.000
版权声明
本文为[山顶看数据]所创,转载请带上原文链接,感谢
https://blog.csdn.net/li1579026891/article/details/122198244
边栏推荐
- 应急医疗通讯解决方案|MESH无线自组网系统
- [8] Assertion failed: dims. nbDims == 4 || dims. nbDims == 5
- 城市应急管理|城市突发事故应急通信指挥调度系统
- pth 转 onnx 时出现的 gather、unsqueeze 等算子
- Are realrange and einsum really elegant
- Solution to slow compilation speed of Xcode
- 公专融合对讲机是如何实现多模式通信下的协同工作?
- PyTorch 13. 嵌套函数和闭包(狗头)
- PyTorch 19. Differences and relations of similar operations in pytorch
- 基于51单片机的温湿度监测+定时报警系统(c51源码)
猜你喜欢

Chapter 3 pytoch neural network toolbox

Use originpro express for free

Gather, unsqueeze and other operators when PTH is converted to onnx

海南凤凰机场智能通信解决方案

Systrace parsing

GIS实战应用案例100篇(五十二)-ArcGIS中用栅格裁剪栅格,如何保持行列数量一致并且对齐?

Chapter 4 pytoch data processing toolbox

imx6ull-qemu 裸机教程2:USDHC SD卡

SPI NAND FLASH小结

Wechat applet uses wxml2canvas plug-in to generate some problem records of pictures
随机推荐
imx6ull-qemu 裸机教程2:USDHC SD卡
torch.where能否传递梯度
机器学习——朴素贝叶斯
EasyUI combobox determines whether the input item exists in the drop-down list
Chapter 2 pytoch foundation 2
Unwind 栈回溯详解
F.pad 的妙用
ECDSA 签名验证原理及C语言实现
北峰通信助力湛江市消防支队构建PDT无线通信系统
面试总结之特征工程
1.1 pytorch and neural network
Detailed explanation of device tree
直观理解 torch.nn.Unfold
画 ArcFace 中的 margin 曲线
城市应急管理|城市突发事故应急通信指挥调度系统
AUTOSAR从入门到精通100讲(八十三)-BootLoader自我刷新
重大安保事件应急通信系统解决方案
公专融合对讲机是如何实现多模式通信下的协同工作?
【51单片机交通灯仿真】
机器视觉系列(01)---综述