原生函数from_unixtime(BIGINT unixtime [, STRING format])使用时间戳为标准unix时间戳,单位必须是秒,但是一般在入库中,基础数据存入的都是13位的毫秒时间戳,例如startdate为BIGINT格式,转化为秒,startdate/1000,但结果变为DOUBLE格式,此时先用cast进行转换,

from_unixtime(cast(startdate/1000 as bigint)) as new_startdate
#例如如下sql用例:
select startdate,from_unixtime(cast(startdate/1000 as bigint),'yyyy-MM-dd HH:mm:ss') as new_startdate from sip where day=20210903 and hour='10' limit 10;

8 条评论

http://www.google.tt/ · 2026-08-21 01:42

References:

Bellagio casino las vegas http://www.google.tt/

http://images.google.co.th/ · 2026-08-21 05:43

References:

Blackjack strategy http://images.google.co.th/

khamtaopattana.go.th · 2026-08-22 03:35

References:

Play online games games khamtaopattana.go.th

foro.cazadividendos.com · 2026-08-22 22:55

References:

Dallas casino foro.cazadividendos.com

发表回复

Avatar placeholder

您的邮箱地址不会被公开。 必填项已用 * 标注