Format temporal duration between in neo4j

Multi tool use


Format temporal duration between in neo4j
I stored the localdatetime() in post node as timestamp, I don't want to display the post, if post age crossed 24 hours. So I wrote below query
MATCH (n:Post) return duration.between(localdatetime() ,n.timestamp+duration({hours:24})) as expiry
I'm getting response something like this.
P0M1DT-15207.548000000S
P0M1DT-4721.134000000S
But I want to display remaining time in client side (javascript) as hh:mm:ss format. So How to format this temporal format into specific format?
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.