Parsing time like '9:00AM'


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({"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.


or if you have a space like I did + ' ' + c.createdTime, "ms", 'MM/dd/yyyy hh:mm:ss a')

1 Like