Kill me now. :-(  Thanks Martynas! - Erich

On Thu, May 19, 2022 at 10:37 AM Martynas Jusevičius <marty...@atomgraph.com>
wrote:

> Works for me:
>
> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
> select * where {
>   bind (xsd:dateTime("2014-06-05T10:10:10+05:00") as ?asDate)
> }
>
>
> http://sparql.org/sparql?query=PREFIX+xsd%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema%23%3E%0D%0Aselect+*+where+%7B%0D%0A++bind+%28xsd%3AdateTime%28%222014-06-05T10%3A10%3A10%2B05%3A00%22%29+as+%3FasDate%29%0D%0A%7D&default-graph-uri=&output=text&stylesheet=%2Fxml-to-html.xsl
>
> In your example:
> - xsd:dateTime() cased wrong
> - no ":" in "0500"
>
> On Thu, May 19, 2022 at 4:33 PM Erich Bremer <er...@ebremer.com> wrote:
> >
> > I'm trying to do a sparql update on a Model in Jena.
> >
> > The below query, against Virtuoso will create "2014-06-05T10:10:10"
> > correctly, but I get null using Jena's SPARQL.
> >
> > PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
> > select * where {graph ?g {?s ?p ?o}
> >   bind (xsd:DateTime("2014-06-05T10:10:10") as ?asDate)
> > }
> > limit 3
> >
> > Even changing the source string to "2014-06-05T10:10:10+0500", will still
> > yield nothing from the Jena conversion.
> >
> >    - Erich
>

Reply via email to