Parsing time like '9:00AM'

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

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.

1 Like