Re: xsd:DateTime not working

2022-05-19 Thread Erich Bremer
Kill me now. :-(  Thanks Martynas! - Erich

On Thu, May 19, 2022 at 10:37 AM Martynas Jusevičius 
wrote:

> Works for me:
>
> PREFIX xsd: 
> 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==text=%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  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: 
> > 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
>


Re: xsd:DateTime not working

2022-05-19 Thread Martynas Jusevičius
Works for me:

PREFIX xsd: 
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==text=%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  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: 
> 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


xsd:DateTime not working

2022-05-19 Thread Erich Bremer
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: 
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