Unparseable date: “NULL” with APOC.DATE.PARSE
Unparseable date: “NULL” with APOC.DATE.PARSE I am using apoc to calculate difference between two dates. It works when I supply value for N.ID in the MATCH clause. But it fails when I remove N.ID because I am trying to process the code for a bunch of IDs not a single one. apoc N.ID MATCH N.ID MATCH (N:PERSON)-[M:PLACED]-(K:ORDER) WHERE K.ORDER_CODE="A23" and N.ID=2511217 WITH N ,max(apoc.date.parse(SUBSTRING(M.ORDER_DATE,0,8),'d',"yyyymmdd")) AS initialTime, apoc.date.parse(SUBSTRING(N.charge_DATE,0,8),'d',"yyyymmdd") AS finalTime RETURN N.ID, finalTime - initialTime as difference ; N.ID difference 2511217 4 N.ID However, when N.ID is removed, I get: N.ID MATCH (N:PERSON)-[M:PLACED]-(K:ORDER) WHERE K.ORDER_CODE="A23" WITH N ,max(apoc.date.parse(SUBSTRING(M.ORDER_DATE,0,8),'d',"yyyymmdd")) AS initialTime, apoc.date.parse(SUBSTRING(N.charge_DATE,0,8),'d',"yyyymmdd") AS finalTime...
