Hi
I am trying to subtract two dates, but am running into what I think are data type issues.
When I use the following statement:
RETURN apoc.date.convert(endDate - LAST_DATE, "ms", "d")
the following error is returned:
Neo.ClientError.Statement.TypeError: Cannot subtract
Date
fromLong
The data types for each are:
apoc.meta.type(endDate) | apoc.meta.type(LAST_DATE) |
---|---|
"INTEGER" | "LocalDate" |
endDate was created from a string:
date('2012-06-12) AS endDate
LAST_DATE was created:
WITH apoc.date.parse('12/31/2018', 'y', 'MM/dd/yyyy') AS LAST_DATE
I haven't been able to either convert endDate using apoc.date.parse to INTEGER, or use toInteger().
I appreciate any help anyone could give.
Kind regards