MySQL和Clickhouse时间日期函数对照表
注意Clickhouse关键词大小写敏感
mysql函数 | clickhouse函数 | 功能 |
---|---|---|
curdate() | today() | 返回当前日期 |
curtime() | now() | 返回当前时间 |
now() | now() | 返回当前的日期和时间 |
unix_timestamp(date) | toUnixTimestamp() | 返回日期date 的unix 时间戳 |
from_unixtime | FROM_UNIXTIME() | 返回unix 时间戳的日期值 |
date(time) | toDate() | 返回日期date |