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;
Table 1. Results
outputInMs

1604448000000