Support for datetime function in Cypher

Hi - I have been trying out memgraph and I have Kafka records written in JSON format. I have been able to import the data successfully and have a “transformation” that reads it and runs the Cypher query per Kafka record successfully to create my graph data.

I have JSON properties written in a common “ISO date-time” format, for example:

2003-01-16T06:59:32.000Z

I can see memgraph’s Cypher has a localDateTime() function, but not a dateTime() function like in Neo4J. Is there a reason for this? I’d ideally like this field to be represented as a date-time.

Hi @sits, it’s nice to hear that you have been trying out Memgraph. The reason for implementing localDateTime() and not introducing a timezone is because localdatetime suited the most use cases we faced. Did you maybe try to transform the received form of the datetime in your transformation and then use Memgraph localDateTime()? Also, what did you find useful to have dateTime() function like in Neo4j? What is the exact use case?

Hi - the date format used in these records is very common and memgraph should really support them out of the box like Neo4J. I could write extra Python code to convert it to a “local datetime” worst case.

Please open an issue regarding this on Memgraph’s GitHub. This is currently not a priority, but it’s good to have it in the backlog along with your reasoning for it. Thank you!