Difference (duration) of two xsd:dateTime literals #4780
-
Hello, Is there a way to get the difference between two date times in RDF4J?
?diff returns empty. Thank you very much |
Beta Was this translation helpful? Give feedback.
Answered by
hmottestad
Sep 14, 2023
Replies: 1 comment 2 replies
-
I'm not sure if this is possible. The SPARQL standard only seems to support numbers when using subtraction. You can use < and > to check which is smaller, but it won't give you the diff. I couldn't find an epoch function either. Which would have made it possible to convert the date time to a number you could diff. |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
arrascue
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm not sure if this is possible. The SPARQL standard only seems to support numbers when using subtraction.
You can use < and > to check which is smaller, but it won't give you the diff.
I couldn't find an epoch function either. Which would have made it possible to convert the date time to a number you could diff.