flink sql 毫秒转date ms转date

TO_DATE(DATE_FORMAT(FROM_UNIXTIME(1629244800000 / 1000),'yyyy-MM-dd'))  -- 2021-08-18


Flink SQL> select TO_DATE(DATE_FORMAT(FROM_UNIXTIME(1629244800000 / 1000),'yyyy-MM-dd'));
+----+------------+
| op |     EXPR$0 |
+----+------------+
| +I | 2021-08-18 |
+----+------------+
Received a total of 1 row

Flink SQL> select TO_DATE(DATE_FORMAT(FROM_UNIXTIME(1629244800000 / 1000),'yyyy-MM-dd'));

+----+------------+

| op |     EXPR$0 |

+----+------------+

| +I | 2021-08-18 |

+----+------------+

Received a total of 1 row

你可能感兴趣的:(总结,flink,sql,大数据)