Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
04-18-2019 11:11 AM
Hi, currently i have about 30 grandchild (two connections deep from root) nodes that have values that are dates as isostrings and i need to wrap all of them with datetime(). i was thinking of querying for all of them, then re-saving them wrapped in datetime(), but is there a better way? maybe a way to do it in one cypher instead of a multistep process?
Solved! Go to Solution.
04-18-2019 01:58 PM
With APOC library you can convert iso date format to date format.
Here is the Cypher script with iso date "2011-08-12T20:17:46.384Z"
RETURN apoc.date.format(apoc.date.parse("2011-08-12T20:17:46.384Z", 'ms', 'yyyy-MM-dd'), 'ms', 'MM-dd-yyyy')
Result: "08-12-2011"
04-18-2019 01:58 PM
With APOC library you can convert iso date format to date format.
Here is the Cypher script with iso date "2011-08-12T20:17:46.384Z"
RETURN apoc.date.format(apoc.date.parse("2011-08-12T20:17:46.384Z", 'ms', 'yyyy-MM-dd'), 'ms', 'MM-dd-yyyy')
Result: "08-12-2011"
All the sessions of the conference are now available online