Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
04-29-2019 07:06 PM
I'm trying to find how I can order my output by date when I have dates that are in the string format produced by the unix date command. I would like to say something like
ORDER BY apoc.date.unix(Date)
The unix data command produces a string that looks like:
Mon Apr 29 19:01:53 UTC 2019
I've upgraded my Neo4j Community addition to the most recent in order to get the temporal functions. These seem to address a similar but different problem. I've now installed APOC but haven't found among the functions there a solution to my problem.
04-29-2019 08:49 PM
Try this:
RETURN apoc.date.format(apoc.date.parse("Mon Apr 29 19:01:53 UTC 2019", 'ms', 'E MMM dd HH:mm:ss Z yyyy'), 'ms', 'MM-dd-yyyy');
Result: "04-29-2019"
04-30-2019 12:38 PM
Thank you. This is very helpful.
I changed the date.format to 'yyyy-MM-dd HH:mm:ss' to get the order just right.
All the sessions of the conference are now available online