flange-ipb commented on issue #2272: URL: https://github.com/apache/jena/issues/2272#issuecomment-1948304017
There is [fn:days-from-duration](https://www.w3.org/TR/xpath-functions/#func-days-from-duration). So ``` PREFIX fn: <http://www.w3.org/2005/xpath-functions#> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> SELECT * WHERE { BIND("P10DT5H30M"^^xsd:duration as ?duration) BIND(fn:days-from-duration(?duration) as ?durationInDays) } ``` would give you the day component of the duration. A result with as decimal number would require an implementation of [op:divide-dayTimeDuration-by-dayTimeDuration](https://www.w3.org/TR/xpath-functions/#func-divide-dayTimeDuration-by-dayTimeDuration) as @asf already mentioned. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
