apoc.date.format
Syntax |
|
||
Description |
Returns a |
||
Arguments |
Name |
Type |
Description |
|
|
The timestamp since epoch to format. |
|
|
|
The unit of the given timestamp. The default is: |
|
|
|
The format to convert the given temporal value to. The default is: |
|
|
|
The timezone the given timestamp is in. The default is: ``. |
|
Returns |
|
Usage Examples
The
The The |
The following converts a datetime in epoch millis to yyyy-MM-dd
format:
WITH datetime("2020-11-04T11:23:22").epochMillis AS datetime
RETURN apoc.date.format(datetime, "ms", "yyyy-MM-dd") AS output;
output |
---|
"2020-11-04" |
The following converts a GMT datetime in epoch millis to yyyy-MM-dd’T’HH:mm:ssz
format, using the Australian/Sydney
timezone:
WITH datetime("2020-11-04T11:23:22+00:00").epochMillis AS datetime
RETURN apoc.date.format(datetime, "ms", "yyyy-MM-dd'T'HH:mm:ssz", "Australia/Sydney") AS output;
output |
---|
"2020-11-04T22:23:22AEDT" |