Throughout this series, we have taken a journey through nearly all aspects of temporal values related to Neo4j - both Cypher and APOC.
In our Part 1 post, we saw how complex programming for dates and times could actually be and how to create instants using functions like
time(), etc. Temporal components also got a brief mention before we took a look at how to get to Neo4j-supported formats from epoch time and strings and capped our post with showing how to use multiple conversions in a single line. APOC saw some spotlight, as we relied on it for some of the conversions.
In our Part 2 post, we walked through truncating temporal types in Cypher and scratched the surface of creating basic durations, plus adding and subtracting them from dates. We then covered duration precision, which forms the foundation of most operations with durations. The last section of that post calculated differences between two dates with
In our Part 3 post, we did another quick review of temporal components (begun in Part 1), and then spent some time working through duration conversions using duration functions. Lastly, we talked about components again, showing which ones we could use based on the duration category (months, days, seconds).
In our Part 4 post, we saw how to combine duration functions and components in order to translate durations in one component category to another one. Then, we put our skills to the test with a couple of date puzzles.
In this post (Part 5!), we circled back to APOC for a step-by-step review of each date and temporal function in the library, making note of which ones are obsolete with functionality provided in Cypher or which are still valuable.
I hope this series has helped you understand Cypher temporals as much as it has for me. I’ve learned so much and asked so many questions. Thank you for taking this journey with me and happy coding!