title: year() function in SPARQL
body: <p>I want to make a query in SPARQL that returns items of the year 2007.
  I tried this :</p>
  
  <pre class="lang-java prettyprint-override"><code>    String requete7String = 
              "PREFIX xsd: &lt;http://www.w3.org/2001/XMLSchema#&gt; "
            + "PREFIX dc: &lt;http://purl.org/dc/elements/1.1/&gt; "
            + "PREFIX rss: &lt;http://purl.org/rss/1.0/&gt; "
            + "PREFIX rdf: &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt; "
            + "SELECT ?item "
            + "FROM &lt;http://www.w3.org/2001/sw/SW-FAQ-feed.rdf&gt; "
            + "WHERE { "
            + "  ?item rdf:type rss:item . "
            + "  ?item dc:date ?dateString ."
            + "  bind(strdt(?dateString, xsd:dateTime) as ?date) "
            + "  FILTER (year(?date) = 2007) "
            + "}";
  </code></pre>
  
  <p>But it returns nothing. The line <code>FILTER (year(?date) = 2007)</code> doesn't work.  However, I saw in SPARQL documentaiton that the function <a href="http://www.w3.org/TR/sparql11-query/#func-year" rel="nofollow">year()</a> takes a dateTime and returns a integer, so can you tell me why it might not work?</p>