user8164962
user8164962

Reputation:

Is there a way of doing the cast from xsd:duration to xsd:time in SPARQL?

For example I want to convert PT1H5M14.000S to 01:05:14

Upvotes: 0

Views: 611

Answers (1)

Jess Balint
Jess Balint

Reputation: 1697

You can just add the duration to a "zero" time:

select * {
bind("PT1H5M14.000S"^^xsd:duration as ?x)
BIND("00:00:00"^^xsd:time + ?x as ?y) }

Upvotes: 1

Related Questions