What is the BEST practice to compare two dates in CYPHER? I use the cypher timestamp() but I need to compare it to a parameter date in the format: moment().startOf('week').toDate().
Have a look at the manual on temporal functions. Neo4j 3.4.x comes with a lot of date functions built into it. And in terms of straight comparison, you can just use
>, and so on to compare them.
If there's a particular type of comparison you're trying to do, let us know.
> moment().startOf('week').toDate() 2019-01-06T05:00:00.000Z
Then you can feed that into neo4j's
datetime function and then use it as an instant and use all of the cypher functions linked above.