1. 日期格式转化(参考)
select beg_time, end_time, extract(epoch from to_timestamp(end_time,‘yyyy-mm-dd-HH24-MI-SS-US‘))-extract(epoch from to_timestamp(beg_time,‘yyyy-mm-dd-HH24-MI-SS-US‘)) from cdb_all_iu_data where beg_time > ‘2017-09-21‘
注:beg_time, end_time以TEXT形式存储,求时间差时转化为时间戳再相减得到结果(s)
时间: 2024-10-19 03:38:51