hive - 在 Hive 3.1.3 中将时间戳从 ms 转换为字符串格式
问题描述
我正在尝试将毫秒时间戳转换为字符串格式,同时保留 ms 部分。下面的代码:
选择 from_unixtime(cast(unix_timestamp(current_timestamp) + regexp_extract(string(current_timestamp),'\.(\d+)$',1) as int), "yyyy-MM-dd HH:mm:ss.SSS") 作为 date_formatted_ms
我怎样才能解决这个问题?
谢谢
解决方案
推荐阅读
- javascript - 如何更改 botman.io 小部件的默认背景颜色
- twilio - 是否有 twilio 媒体资源的在线列表
- python - 使用 Python 多处理读取大文件
- sas - 用 sas 程序绘制动态参考线
- oracle - 我如何使用 plsql 通过 FTP 发送 csv 文件?
- android-databinding - Android 数据绑定“找不到方法”
- javascript - 当控制台跟踪未指示完整跟踪时,在大量使用的函数中调试 javascript TypeError
- kubernetes - 用于检查 AlertManager 的错误 Prometheus 端点
- vb.net - 控制号两位反转
- swift - 在 SwiftUI 中使用 google 帐户登录后是否有任何改变视图的方法?