I need some help to calculate the difference between two dates with SPARQL in Ontotext GraphDB. I know that SPARQL protocol does not support arithmetic operation on dates, however some SPARQL engines support it.
Just as an example in Fuseki I could do .
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT ?duration
WHERE {
BIND (("2011-02-04T14:45:13.815-05:00"^^xsd:dateTime - "2011-02-
02T14:45:13.815-05:00"^^xsd:dateTime) AS ?duration)
}
the result is duration: "P2DT0H0M0.000S"^^xsd:duration
. Then I can get 2 days diff, or Virtuoso provides a built-in function bif:datediff
.
My question is, if is there something similar on GraphDB to solve this easy problem without a big workaround.
Thanks in advance.