Hello,
I would like to ask if it is doable to do something like this in Sparql on
Jena TDB.
I would like to calculate the difference between 2 dates.
What I have at the moment working is:
BIND(fn:year-from-dateTime(?date_of_birth) AS ?year_of_birth)
BIND(fn:year-from-dateTime(?date_of_death) AS ?year_of_death)
BIND(?year_of_death - ?year_of_birth AS ?age)
BIND(fn:concat(?age, " (", ?year_of_birth, "-", ?year_of_death,
")" ) AS ?age_at_death)
Unfortunately it is not perfect calculation because it just subtracts two
years from ech other and will now answer precisely how old was someone when
he died.
I would need to extract years from xsd:duration
Is it possible to do it?
I would appreciate any answer.