Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Neo4j - Date conversion

I'm using Neo4j database.Neo4j does not have date data type only have timestamp data type.

I need to compare current date with existing date using cql query.

My existing date format is "8/4/2011" that is string.

Then how can I compare it.Any way to use stored procedure [date] while csv bulk data import time.

I used APOC stored procedure but I don't know how compare it.

CALL apoc.date.format(timestamp(),"ms","dd.MM.yyyy")
07.07.2016

CALL apoc.date.parse("13.01.1975 19:00","s","dd.MM.yyyy HH:mm")
158871600

I expect like this

MATCH(dst:Distributor) WHERE dst.DIST_ID = "111137401" WITH dst CALL apoc.date.parse(dst.ENTRY_DATE,'s', 'dd/MM/yyyy') YIELD d SET  dst.ENTRY_DATE = d RETURN dst;

Any possibilities please help me...

like image 470
nmkkannan Avatar asked Mar 30 '26 18:03

nmkkannan


1 Answers

RETURN datetime("2018-06-04T10:58:30.007Z").epochMillis

1528109910007

like image 75
Jobin Mathew Avatar answered Apr 02 '26 03:04

Jobin Mathew



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!