2020-07-07
閱讀量:
1123
Hive 時間戳和日期相互轉(zhuǎn)換 from_unixtime和unix_timestamp
Hive 時間戳和日期相互轉(zhuǎn)換:from_unixtime和unix_timestamp
時間戳轉(zhuǎn)日期
select distinct from_unixtime(1441565203,‘yyyy/MM/dd HH:mm:ss’) from test_date;
日期轉(zhuǎn)時間戳
select distinct unix_timestamp(‘20111207 13:01:03’) from test_date; // 默認格式為“yyyy-MM-dd HH:mm:ss“
select distinct unix_timestamp(‘20111207 13:01:03’,‘yyyyMMdd HH:mm:ss’) from test_date;






評論(0)


暫無數(shù)據(jù)
推薦帖子
0條評論
1條評論
0條評論