Right, casting to xsd:dayTimeDuration is not in the spec and
swrlb:dayTimeDuration is the best option. The other possibility is
using XQuery's multiply-dayTimeDuration that Stardog supports by
overloading the * operator. If you just have hours fields then you'd
have
SELECT * {
BIND(10 AS ?hours)
BIND(?hours * "PT1H"^^xsd:dayTimeDuration AS ?duration)
}
But if you have multiple fields for your duration then you'd need to
repeat this for each field and add them up which would be verbose:
SELECT * {
BIND(10 AS ?hours)
BIND(5 AS ?minutes)
BIND((?hours * "PT1H"^^xsd:dayTimeDuration) + (?minutes *
"PT1M"^^xsd:dayTimeDuration) AS ?duration)
}
Best,
Evren
On Wed, May 18, 2016 at 10:12 AM, Zachary Whitley