apoc.date.parse
Function
apoc.date.parse(time String, unit String, format String, timezone String)
- parses the given date string from a specified format into the specified time unit.
Signature
apoc.date.parse(time :: STRING?, unit = ms :: STRING?, format = yyyy-MM-dd HH:mm:ss :: STRING?, timezone = :: STRING?) :: (INTEGER?)
Input parameters
Name | Type | Default |
---|---|---|
time |
STRING? |
null |
unit |
STRING? |
ms |
format |
STRING? |
yyyy-MM-dd HH:mm:ss |
timezone |
STRING? |
Usage Examples
The following converts a date string into epoch milliseconds:
RETURN apoc.date.parse("2020-11-04", "ms", "yyyy-MM-dd") AS outputInMs;
outputInMs |
---|
1604448000000 |
Was this page helpful?