cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Neo4j temporal date - post going to expiry

gchokeen
Node Link

I want to show to user the post going to expiry with in 23:05:10 (hh:mm:ss) but the below query working opposite (01:55:50) if the expiry time is not belongs to today. If expiry time in same date yes it working properly, can anyone tell me how to fix it

with duration.between(post.expiry,datetime()) as expiry return apoc.text.format('%02d:%02d:%02d', [expiry.hours, expiry.minutesOfHour, expiry.secondsOfMinute])

Thanks
Gowri

1 ACCEPTED SOLUTION

Try using duration.inSeconds() instead of duration.between() for this.

View solution in original post

2 REPLIES 2

Try using duration.inSeconds() instead of duration.between() for this.

Thank you so much andrew, that fixed the issue