Neo4J DateTime错误的翻译为1970
我的节点与DateTime有关,在使用转换为: https://community.neo4j.com/t/cannot-construct-date time-from-no-value-failure-when-processing-file/34973/4
我遇到了1970年的误解。帮助查找此查询有什么问题?
MATCH (n:Resource)
with n, datetime({epochmillis: toInteger(n.created_at)}) as time
return n.created_at, toInteger(n.created_at), time
时间列没有意义,应该在2022年。 https://www.epochconverter.com/
得到了此结果:
"n.created_at" │"toInteger(n.created_at)"│"time" │
╞═════════════════╪═════════════════════════╪════════════════════════════════╡
│1651750310.706613│1651750310 │"1970-01-20T02:49:10.310000000Z"│
├─────────────────┼─────────────────────────┼────────────────────────────────┤
│1651750359.453425│1651750359 │"1970-01-20T02:49:10.359000000Z"│
├─────────────────┼─────────────────────────┼────────────────────────────────┤
│1651751391.714048│1651751391 │"1970-01-20T02:49:11.391000000Z"│
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您正在使用
epochmillis
,希望以毫秒为单位,但您的create_at
在几秒钟内。只需将其乘以1000,然后插入Epochmillis
You are using
epochmillis
which expect to get the timestamp in milliseconds, but yourcreated_at
is in seconds. Just multiply it by 1000 before inserting toepochmillis