This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Using this MATCH in the beginning of the query to define the type of node you are referencing will make Neo4J iterate through | |
| // each of them, avoiding the need to use other methods. | |
| // startYear is the start of the year range, endYear is the end of the year range. Change to your needs as you see fit. | |
| // Variables y and m are the random year and month generated, so you can obtain the days in the next step, that are returned as | |
| // the variable maxDays in the end of the CASE statement | |
| // With the SET command on line 15, you can either update or create the desired property containing the random date you just created. | |