Using the datetime( ) Method for Groovy Time Data - Amazon Neptune
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Using the datetime( ) Method for Groovy Time Data

Neptune provides the datetime method for specifying dates and times for queries sent in the Gremlin Groovy variant. This includes the Gremlin Console, text strings using the HTTP REST API, and any other serialization that uses Groovy.


This only applies to methods where you send the Gremlin query as a text string. If you are using a Gremlin Language Variant, you must use the native date classes and functions for the language. For more information, see the next section, Using Native Date and Time for GLV Time Data.

Starting with TinkerPop 3.5.2 (introduced in Neptune engine release, datetime is an integral part of TinkerPop.

You can use the datetime method to store and compare dates: