Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
01-08-2020 11:08 PM
Hello My issue is I want to get some nodes in fixed date between range of fixed time. I am importing nodes and relations from separate csv files .In relationship files there is a field name TIMESTAMP which contains string value. I have casted it in date time object.
my timestamp string looks like this -"2019-09-08T17:46:10Z" , I want to separate '2019-09-08' part from this string.
my so far done query is given bellow.
match ()-[r:wash|earns|owns]->(d)
with datetime(r.TIMESTAMP) as dateval,d,type(r) as transactiontype
where dateval.hour>=10 and dateval.hour<12
return dateval.hour,d.id,transactiontype
this query works fine for fixed range of hours. but I want to give another condition for fixed date like
where date ='2019-09-08' or something similar like that . I can't make it separate from my timestamp field. and can't fit this condition in my query. My data size is very large 7+ million and I am newbie in neo4j
How could I solve this.
01-09-2020 12:44 AM
WHERE dateval.year = 2019 AND dateval.month = 9 AND dateval.day = 8 AND dateval.hour>=10 AND dateval.hour<12
01-11-2020 12:17 PM
Using APOC:
RETURN apoc.date.format(apoc.date.parse("2019-09-08T17:46:10Z", 'ms', 'yyyy-MM-dd'), 'ms', 'yyyy-MM-dd')
Result: "2019-09-08"
All the sessions of the conference are now available online