I get the following error.
Virtuoso 22007 Error DT006: Cannot convert -0359 to datetime : Incorrect month field length
SPARQL query:
define sql:big-data-const 0
#output-format:text/html
define sql:signal-void-variables 1 select ?item bif:year(xsd:dateTime( str(?dob))) as ?m{
?item <h://f.cm/ns/common/topic/notable_types> <h://f.cm/ns/people/person> .
?item <h://f.cm/ns/people/person/date_of_birth> ?dob
} limit 675
If I change the limit to 674
, it works.
What I suspected was that some datetime field is wrong somewhere and printed ?dob
, which revealed that one of the values is -0359
.
Solution is to validate the value before applying bif
function.
But, how can we validate datetime in SPARQL?