Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
12-15-2021 01:13 AM
Hi everyone,
This is my first time using the APOC package in neo4j.
I am trying to convert the values of my property key from string format to datetime format( eg, "2021/03/06 13:05:45.7" -> 2021/03/06T13:05:45.7
//change string datetime to object datetime
merge (p:POSITIONS)
with p.time as d
where d is not null
with apoc.date.parsed(d,'ms',"yyyy-MM-dd' 'HH:mm:ss") as r
set r= datetime({epochmillis:r})
But the error I get is
variable 'p' is not defined
Anyone have any suggestions?
12-15-2021 01:54 AM
12-15-2021 01:59 AM
12-15-2021 02:04 AM
MATCH (p:POSITIONS)
SET (CASE WHEN p.time IS NOT NULL THEN p END).time = datetime({epochmillis: apoc.date.parse(p.time, "ms", "yyyy-MM-dd HH:mm:ss")})
All the sessions of the conference are now available online