Skip to content

Instantly share code, notes, and snippets.

@michael-simons michael-simons/README.md
Last active Nov 1, 2019

Embed
What would you like to do?
Detect and migrate string properties of nodes to dedicated types
create (m:Mixed {createdAt: '2015-07-21T21:40:32.142+0100', name:'old'})
create (m:Mixed {createdAt: datetime(), name:'new'})
match (m:Mixed)
where apoc.meta.types(m).createdAt = 'STRING'
set m.createdAt = datetime(m.createdAt)
RETURN m
// See https://neo4j.com/docs/cypher-manual/current/functions/temporal/datetime/#functions-datetime-create-string
// for parsing options
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.