Built-in date and time functions¶
Nebula Graph supports the following built-in date and time functions:
Function | Description |
---|---|
int now() | Return the current date and time of the system time zone. |
date date() | Return the current UTC date based on the current system. |
time time() | Return the current UTC calendar time of the current time zone. |
datetime datetime() | Return the current UTC datetime based on the current time. |
The date(), time(), and datetime() functions accept three kind of parameters, namely empty, string, and map.
Examples¶
> RETURN now(), date(), time(), datetime();
+------------+------------+--------------+-------------------------+
| now() | date() | time() | datetime() |
+------------+------------+--------------+-------------------------+
| 1611907165 | 2021-01-29 | 07:59:22.000 | 2021-01-29T07:59:22.000 |
+------------+------------+--------------+-------------------------+
OpenCypher compatibility¶
- Time in openCypher is measured in milliseconds.
- Time in nGQL is measured in seconds. The milliseconds are displayed in
000
.
Last update: March 29, 2021