Module

Dates and Durations

In this module, you will learn how to work with temporal types in Neo4j. You will start by understanding the available date, time, and duration types, then apply them to real queries against the movies database —converting raw integers into dates, truncating dates for grouping, computing time spans, and building date range searches.

This module covers:

  • Neo4j's built-in temporal types: date, datetime, time, localtime, and localdatetime
  • Converting integer properties into proper date values using constructor functions
  • Truncating dates to specific time boundaries with date.truncate()
  • Creating durations and computing time spans with duration.between()
  • Performing date arithmetic using + and - operators
  • Building index-friendly date range searches using chained comparisons
Ready, let's go!