22问答网
所有问题
hive 中怎么unix时间戳转化为"yyyy-mm-dd hh:mm:ss
如题所述
举报该问题
推荐答案 2016-12-12
1.日期函数UNIX时间戳转日期函数: from_unixtime语法:from_unixtime(bigint unixtime[, stringformat])
返回值: string
说明: 转化UNIX时间戳(从1970-01-0100:00:00 UTC到指定时间的秒数)到当前时区的时间格式
举例:
hive> select from_unixtime(1323308943,'yyyyMMdd') from dual;
20111208
2.获取当前UNIX时间戳函数: unix_timestamp语法: unix_timestamp()
返回值: bigint
说明: 获得当前时区的UNIX
温馨提示:答案为网友推荐,仅供参考
当前网址:
http://22.wendadaohang.com/zd/CI2h2C0626XXfIffTSh.html
其他回答
第1个回答 推荐于2018-03-05
时间为00:00:00:
select from_unixtime(unix_timestamp(),'yyyy-MM-dd 00:00:00')
时间为当前时间:
select from_unixtime(unix_timestamp(),'yyyy-MM-dd HH:mm:ss')
本回答被网友采纳
第2个回答 2017-08-17
from_unixtime(unix_timestamp(COL,'yyyyMMddHHmmss'), 'yyyy-MM-dd HH:mm:ss')
相似回答
大家正在搜
相关问题
Windows、Linux、UNIX、Dos操作系统分别是用...
第一个UNIX操作系统是用什么电脑语言编写的?
Unix操作系统是什么
unix系统与c语言有什么关系?
UNIX操作系统属于?
微软的操作系统是用什么语言编的,linux .unix呢?
请问都什么编程语言能同时在unix、linux、和windo...
unix操作系统是什么软件吗?