我有帶日期時間的節點,并且在使用轉換時為: https ://community.neo4j.com/t/cannot-construct-date-time-from-no-value-failure-when-processing-file/34973/3 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"│
uj5u.com熱心網友回復:
您正在使用epochmillis
which expect 以毫秒為單位獲取時間戳,但您created_at
的是以秒為單位。在插入之前只需乘以 1000epochmillis
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/472616.html
下一篇:熊貓-在n個月前取值