Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
03-04-2022 08:57 AM
I am using neo4j REST API to create nodes and relationships. I refer following documentation.
The nodes that I am dealing with have dynamic properties. Therefore I am using following payload with parameters to create nodes.
{
"statements" : [ {
"statement" : "CREATE (n:Person $props) RETURN n",
"parameters" : {
"props" : {
"name" : "My Node",
"dob" : "datetime('20211229T153000')",
"age": 55,
"awsome": true
}
}
} ]
}
This is perfectly work with String, Integer, Boolean data types. However I need to use datetime data type for "dob" . If I use datetime function within double quotes (as in above example) neo4j treat it as string value and does not store as datatime data type. Is there a solution for this?
03-05-2022 04:59 AM
From the documentation, looks like that is not a supported format. You could set the properties individually in the cypher statement and use the datetime method to convert your string representation of a date to an actual date in the SET clause.
All the sessions of the conference are now available online