Hi Joseph,

BTW SPARQL has a built-in feature to convert between XSD datatypes, e.g.

        LET (?string := "2008-01-02") .
        LET (?date := xsd:date(?string))

binds ?date with "2008-01-02"^^xsd:date.

I don't know what you mean with converting a date to a class, but you  
can convert a URI string to a class using the function smf:resource(? 
uri). You could then use smf:buildURI() to construct a valid URI from  
a date.

I hope that helps, if not please clarify.

Holger



On Jan 22, 2009, at 6:45 AM, Joseph Shea wrote:

>
> Hello all. I'm relatively new to TopBraid. I'm trying to convert
> strings into classes, or even dates for that matter....I'm not really
> sure how to do that, but I tried converting a string into a date, and
> the following SPARQL query seemed to have done the job, though it was
> never changed. Any advice on this, or how to convert strings into
> classes? (Websites and tutorials would also be appreciated)
>
> SELECT  *
>       WHERE {
>               ?person :HasBirthdate ?Birthdate .
>               LET (?newBirthdate := smf:cast(?Birthdate, xsd:date)) .
>       }
>
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TopBraid Composer Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/topbraid-composer-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to