sql-时间戳转date

-- 时间戳转date
SELECT FROM_UNIXTIME(1410403824);

image

在实际使用中需要除以1000

SELECT DISTINCT
        a.id,
        FROM_UNIXTIME(a.enter_time/1000) enter_time, -- long 转 date格式,实际使用需要1000
        (a.deduct_money / 100) deduct_money
FROM abcd a
posted @ 2022-01-17 18:59  生生灯火半杯月  阅读(655)  评论(0)    收藏  举报