Neo4j Admin Import Tool w/ epoch column values

Hello,

I have a CSV w/ a column whose values are time since epoch entries. (So longs, basically). I'd like to do something like this:

insertDate:datetime{epochMillis}, otherAtts
123456123, another attribute

Is this possible? Or will I need to do it post import, or change the CSV file pre-import to be read-able values?

EDIT: sorry, I forgot to mention I'm using neo4j-admin tool to import this data.

Thanks,
Sean

During import itself you can convert epoch time:

apoc.date.format((ToInteger("1449158574")),('s'), ('yyyy/MM/dd'), ('PST')) as dates
Result: 2015/12/03
PST is the time zone.

Replace "1449158574" with your epoch time like line.epochMillis in your .csv import.

1 Like

This would be great and definitely work if I were doing the import w/ cypher. I'm using the neo4j-admin tool though.

Also, you could also do it with datetime({epochMillis: "1234125125"}) which formats it in a way you can use temporal indexes on, which may be more desirable than using the apoc.date.format. Unless that still works for temporal indexes?