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.

Ordering nodes by depature time with non standard time format

Hi, I need to order nodes, which have relationship to Stop node, by departure time(hh:mm:ss) and connect them as row from lowest to highest departure time. The catch is, few of these nodes have departure time above standard 24hr format (24:24:13 for example), so I can't cast them to time property. Is there a way to do it?

1 REPLY 1

ameyasoft
Graph Maven

with split("24:24:13", ':') as t1
with ("00" + ':'+ t1[1] +':'+ t1[2]) as t2
return t2, time(t2)

Result: "00:24:13", "00:24:13Z"

Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

All the sessions of the conference are now available online