Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
05-10-2019 05:41 AM
Hi,
I'm looking to parse time with AM/PM format to match data after a certain hour.
How can I do that ?
Thanks for help
Solved! Go to Solution.
05-10-2019 09:17 AM
return time(datetime({epochMillis:apoc.date.parse("9:00AM", "ms","hh:mma")}))
does the trick.
Bottom line is that standard cypher cannot parse arbitrary formats, so APOC to the rescue to parsing and returing milliseconds. Those can be passed to datetime
allowing finally initializing of a time
instance.
05-10-2019 09:17 AM
return time(datetime({epochMillis:apoc.date.parse("9:00AM", "ms","hh:mma")}))
does the trick.
Bottom line is that standard cypher cannot parse arbitrary formats, so APOC to the rescue to parsing and returing milliseconds. Those can be passed to datetime
allowing finally initializing of a time
instance.
10-22-2019 09:12 AM
or if you have a space like I did
apoc.date.parse(c.createdDate + ' ' + c.createdTime, "ms", 'MM/dd/yyyy hh:mm:ss a')
All the sessions of the conference are now available online