temporal
The temporal
module enables more sophisticated manipulation, conversion, and calculation of date and time. These functions handle temporal (time-related) operations and offer extended capabilities compared to the date
functions.
Trait | Value |
---|---|
Module type | algorithm |
Implementation | C++ |
Graph direction | directed/undirected |
Edge weights | weighted/unweighted |
Parallelism | sequential |
Procedures
format(temporal, format)
Formats a temporal value.
Input:
temporal: Any
➡ temporal value (date, time, datetime, duration) to be formatted.format: str
➡ the wanted format.
:::info
The format parameter supports values defined under Python strftime format codes (opens in a new tab).
:::
Output:
formatted: str
➡ received temporal value in the specified format.
Usage:
CALL temporal.format(duration({minute: 127}), "%H:%M:%S") YIELD formatted RETURN formatted;
+-----------------------+
| formatted |
+-----------------------+
| "02:07:00" |
+-----------------------+