Hi Norbert, I don’t think this is a bug. According to the recommendation, the year function expects an xs:dateTime argument, and matches functionality of fn:year-from-dateTime..
https://www.w3.org/TR/sparql11-query/#func-year Cheers, Geert From: <general-boun...@developer.marklogic.com<mailto:general-boun...@developer.marklogic.com>> on behalf of "Weissenberg, Norbert" <norbert.weissenb...@isst.fraunhofer.de<mailto:norbert.weissenb...@isst.fraunhofer.de>> Reply-To: MarkLogic Developer Discussion <general@developer.marklogic.com<mailto:general@developer.marklogic.com>> Date: Tuesday, August 22, 2017 at 12:13 PM To: "general@developer.marklogic.com<mailto:general@developer.marklogic.com>" <general@developer.marklogic.com<mailto:general@developer.marklogic.com>> Subject: [MarkLogic Dev General] Bug in SPARQL date functions Hello, using Query Console of MarkLogic-9.0-1.1-amd64, executing PREFIX xs:<http://www.w3.org/2001/XMLSchema#> SELECT (year("2017-08-17"^^xs:date) AS ?year) WHERE {} returns null, while the following returns “2017”^^xs:integer correctly. Same with other SPARQL date functions and with xs:datetime. PREFIX xs:<http://www.w3.org/2001/XMLSchema#> SELECT (year("2017-08-17T00:00:00"^^xs:date) AS ?year) WHERE {} Best regards, Norbert
_______________________________________________ General mailing list General@developer.marklogic.com Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general