I trying build out some functions to populate my new Neo4j graph and I am having a hard time getting dates to populate as the correct data type in Neo4j using Py2Neo v4 and Neo4j 3.4.7. According to the Neo4j docummention there are Datetime data types... and spatial points which I want to get too as well
I can not for the life of me find any documentation in Py2Neo for using either spatial points or temporal points. I found that there was back in v2 of Py2Neo a plugin for these data types but haven't found anything else on it.
I can send a Python datetime.datetime object to Neo4j as a node property but when I try to query with Cypher it doesn't acknowledge it as being in the correct format.
# python/py2neo code being used to make the node
example_node = Node("Example", date=datetime.datetime.now())
tx.create(example_node)
# cypher query
MATCH (e:Example)
WHERE e.date > datetime("2018-12-31")
RETURN e
Note: if I cast e.date to datetime like this datetime(e.date) I get the syntax error:
Neo.ClientError.Statement.SyntaxError: Text cannot be parsed to a DateTime
"2019-01-14 13:00:52"
Any help in finding proper documentation in Py2neo, or maybe even a better driver to use would be appreciated.
Thank you