14.2.2.3 APIs for Accessing Datetime Data
The in-memory graph server (PGX) uses the new Java 8 temporal data types for accessing datetime data through the Java API:
datein PGX maps toLocalDatein Javatimein PGX maps toLocalTimein Javatimestampin PGX maps toLocalDateTimein Javatime with time zonein PGX maps toOffsetTimein Javatimestamp with time zonein PGX maps toOffsetDateTimein Java
You can retrieve a date as shown in the following code:
Retrieve a Date Using JShell
opg4j> var dateOfBirthProperty = graph.getVertexProperty("date_of_birth")
opg4j> var birthdayOfJudy = dateOfBirthProperty.get(1)Retrieve a Date Using Java
import java.time.LocalDate;
import oracle.pgx.api.*;
...
VertexProperty<LocalDate> dateOfBirthProperty = graph.getVertexProperty("date_of_birth")
LocalDate birthdayOfJudy = dateOfBirthProperty.get(1);Retrieve a Date Using Python
date_of_birth_property = graph.get_vertex_property("date_of_birth")
birthday_of_judy = date_of_birth_property.get(1)Parent topic: Using Datetime Data Types