cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

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

Comments
ameyasoft
Graph Maven

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.

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?

Version history
Last update:
‎04-16-2019 05:31 AM
Updated by:
Contributors