Pedro Carvalho Pedro Carvalho - 7 months ago 66
SQL Question

Load CSV in Neo4j and convert timestamp to long

I want to upload the data from a PostgreSQL database to a Neo4j one, and some of my rows are millisecond-precision timestamps. How do I convert them to (at least second-precision) longs when doing that (presumably with LOAD CSV)?


Milliseconds since 1970-01-01:

select round(extract(epoch from now()) * 1000)::bigint;