dateTime/duration SPARQL functions

34 views
Skip to first unread message

Peter Neorr

unread,
Aug 5, 2016, 4:36:52 PM8/5/16
to Stardog
I know that I can use something like "bind ( day(?date) as ?day) " to extract parts of an xsd:dateTime value.  

Is it possible to use get the the days component of xsd:duration value?

Regards,
Peter Neorr



Peter Neorr

unread,
Aug 5, 2016, 4:48:49 PM8/5/16
to Stardog
I should of searched the archives first.  ;)

I solved my problem by binding to a number, and then creating my duration value from that.  e.g:
select * where {
    bind (60 as ?days)
    bind (?days * "P1DT0H"^^xsd:dayTimeDuration as ?duration)
}


--
-- --
You received this message because you are subscribed to the C&P "Stardog" group.
To post to this group, send email to sta...@clarkparsia.com
To unsubscribe from this group, send email to
stardog+u...@clarkparsia.com
For more options, visit this group at
http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en
---
You received this message because you are subscribed to the Google Groups "Stardog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to stardog+u...@clarkparsia.com.
Reply all
Reply to author
Forward
0 new messages