Cannot construct date time from: NO_VALUE (Failure when processing file '/C:/neo4j423/import/northwind/employees.csv' on line 2.)
I tried with just 1 row in the csv. birthdate and hiredate both are available.
If I try with a hardcoded value like '2001-01-01', the code works just fine.
I have the same issue. Did you end up solving it?
It seems that the datetime() function requires a hardcoded timestamp value rather than a variable or alias
.csv file stores all values as strings. While importing, one needs to use toInteger function and that stores the property value as integer. Here is the workaround sample:
with '1609283699032' as tme
with date(datetime({epochmillis: toInteger(tme)})) as r
return r
For anyone who reads this in the future:
After trying out ameyasoft's solution, I discovered that passing in a string timestamp could also produce this different error: Cannot construct date time from: String("1609283699032") , which is more informative than the first error I got.
After that, I also realized that my error was coming from me reading in null values for n.timestamp, so I just added a WHERE n.timestamp IS NOT NULL, and it fixed the problem