apoc.date.convert
语法 |
|
||
描述 |
将给定时间戳从一个时间单位转换为另一个时间单位的时间戳。 |
||
参数 |
名称 |
类型 |
描述 |
|
|
要转换的时间戳。 |
|
|
|
给定时间戳的单位。 |
|
|
|
将给定时间戳转换到的单位。 |
|
返回 |
|
||
使用示例
|
计算出的值将以 |
以下将 30 分钟转换为秒
RETURN apoc.date.convert(30, "minutes", "seconds") as outputInSeconds;
| outputInSeconds |
|---|
1800 |
以下将当前日期时间(纪元秒)转换为自 1970 年 1 月 1 日以来的天数
RETURN apoc.date.convert(datetime().epochSeconds, "seconds", "days") as outputInDays;
| outputInDays |
|---|
18571 |