Have you tried the moment node in nodered ? It does exactly that…
If you give it that date and use the “timenow” option for the output it will give you “in 6 minutes” assuming the date is 6 minutes in the future
GV
Sorry for the half good hint!
Have you seen the “i” on the right panel? If you select a node, information on how to use it is displayed. You will see that some nodes have very good documentation. moment is one of those
GV
Nearly there - your flow is imported and the rde node installed
Injecting the timestamp picks up the 3 entities via “get entities” but “set msg.array” gives this error
“Invalid JSONata expression: The single argument form of the sort function can only be applied to an array of strings or an array of numbers. Use the second argument to specify a comparison function”
Replacing the jsonata expression in the change node by
$sort(*.state)
should do the trick.
You can copy the output of the get_entities into http://try.jsonata.org to adjust it.
This is what I am using to create the jsonata stuff (I am not fluent in this one!)