1.字符串與日期間轉換
date '2007-05-10' cast( (curent_timestamp(6) (format 'YYYYMMDDHHMISS') )as varchar(19)) //結果為20180615164201
2.毫秒轉換為時間戳
select cast (to_timestamp(cast(1525314063000/1000 as BIGINT)) as date); //結果為2018-05-03 02:21:03.000000
注解:日期從1970-01-01開始的,Unix誕生日期,做為計算機時間原點。