I want to create a relationship in neo4j having properties as day, time, year of the current date.
how can I get the current day,month, year using cypher neo4j??
I want to create a relationship in neo4j having properties as day, time, year of the current date.
how can I get the current day,month, year using cypher neo4j??
I think you can simply store a timestamp, and then deal with it in your application:
CREATE (n1:Node)-[r:RELATIONSHIP {date:timestamp()}]->(n2:Node)
As you can see on Neo4j's documentation, cypher does actually support timestamp()
method call in the query, which is the most accurate date you can store, as a long
First, Neo4j doesn't have support for DateTime type.
data
read
Another approach could be use GraphAware TimeTree. Which is Neo4j module for representing time in Neo4j as a tree structure.