Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
07-18-2019 02:04 PM
Hi Guys,
I have a CSV file where the date format is [mm/DD/yy] (for example: 7/13/19, "July 13, 2019") and I want to upload to Neo4j using [yyyy/MM/dd] (2019/13/07). Are there any APOC procedures or Cypher queries that I can use to do this?
Thank you
Yamil
07-18-2019 02:13 PM
Sure, you can do a parse followed by a format with APOC:
WITH "07/13/19" as input
WITH apoc.date.parse(input, 'ms', 'MM/dd/yy') as ts
RETURN apoc.date.format(ts, 'ms', 'yyyy/MM/dd')
07-18-2019 02:16 PM
RETURN apoc.date.format(apoc.date.parse("July 13, 2019", 'ms', 'MMMM dd, yyyy'), 'ms', 'yyyy/MM/dd')
Result: "2019/07/13"
04-04-2020 12:04 PM
This was very helpful! Thank you so much!
07-19-2019 06:40 AM
Thank you guys the two answer are perfect. Both are really good solution.
Thank you so much
All the sessions of the conference are now available online