<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic DATE and TIMESTAMP don&amp;apos;t work as expected in NXQL queries in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/date-and-timestamp-don-apos-t-work-as-expected-in-nxql-queries/m-p/322566#M9567</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I am having some problems with DATE and TIMESTAMP when using NXQL queries. According to the documentation:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;CODE&gt;TIMESTAMP &amp;lt;timestamp&amp;gt;&lt;/CODE&gt;: a timestamp in ISO format yyyy &lt;CODE&gt;-&lt;/CODE&gt; &lt;EM&gt;MM&lt;/EM&gt; &lt;CODE&gt;-&lt;/CODE&gt; &lt;EM&gt;dd&lt;/EM&gt; &lt;EM&gt;hh&lt;/EM&gt; &lt;CODE&gt;:&lt;/CODE&gt;&lt;EM&gt;mm&lt;/EM&gt; &lt;CODE&gt;:&lt;/CODE&gt; &lt;EM&gt;ss&lt;/EM&gt;[&lt;CODE&gt;.&lt;/CODE&gt; sss] (the space separator can be replaced by a &lt;CODE&gt;T&lt;/CODE&gt;).&lt;/LI&gt;
&lt;LI&gt;&lt;CODE&gt;DATE&lt;/CODE&gt; : a date in ISO format yyyy &lt;CODE&gt;-&lt;/CODE&gt; &lt;EM&gt;MM&lt;/EM&gt; &lt;CODE&gt;-&lt;/CODE&gt; &lt;EM&gt;dd&lt;/EM&gt;, converted internally to a timestamp by adding &lt;CODE&gt;00:00:00&lt;/CODE&gt; to it.&lt;/LI&gt;
&lt;/UL&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Now, let's do an example search:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;STRONG&gt;With date:&lt;/STRONG&gt; docinf:dateReceived &amp;gt; DATE '2019-08-14'&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;With timestamp:&lt;/STRONG&gt; docinf:dateReceived &amp;gt; TIMESTAMP '2019-08-14 00:00:00'
Both queries should return the same results, but they don't.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;In this test, I only have one document with the following date: 15-08-2019 01:09:09. The problem is that, in my country, we are in GMT+2, so in ElasticSearch I see the following: 2019-08-14T23:09:09.000Z&lt;/P&gt;
&lt;P&gt;Anyway, according to nuxeo documentation, DATE '2019-08-14' and TIMESTAMP '2019-08-14 00:00:00' are exactly the same, and timezone shouldn't be a problem, but that's not true. Am I doing something wrong?&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;</description>
    <pubDate>Fri, 23 Aug 2019 08:23:12 GMT</pubDate>
    <dc:creator>Rodri_</dc:creator>
    <dc:date>2019-08-23T08:23:12Z</dc:date>
    <item>
      <title>DATE and TIMESTAMP don&amp;apos;t work as expected in NXQL queries</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/date-and-timestamp-don-apos-t-work-as-expected-in-nxql-queries/m-p/322566#M9567</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I am having some problems with DATE and TIMESTAMP when using NXQL queries. According to the documentation:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;CODE&gt;TIMESTAMP &amp;lt;timestamp&amp;gt;&lt;/CODE&gt;: a timestamp in ISO format yyyy &lt;CODE&gt;-&lt;/CODE&gt; &lt;EM&gt;MM&lt;/EM&gt; &lt;CODE&gt;-&lt;/CODE&gt; &lt;EM&gt;dd&lt;/EM&gt; &lt;EM&gt;hh&lt;/EM&gt; &lt;CODE&gt;:&lt;/CODE&gt;&lt;EM&gt;mm&lt;/EM&gt; &lt;CODE&gt;:&lt;/CODE&gt; &lt;EM&gt;ss&lt;/EM&gt;[&lt;CODE&gt;.&lt;/CODE&gt; sss] (the space separator can be replaced by a &lt;CODE&gt;T&lt;/CODE&gt;).&lt;/LI&gt;
&lt;LI&gt;&lt;CODE&gt;DATE&lt;/CODE&gt; : a date in ISO format yyyy &lt;CODE&gt;-&lt;/CODE&gt; &lt;EM&gt;MM&lt;/EM&gt; &lt;CODE&gt;-&lt;/CODE&gt; &lt;EM&gt;dd&lt;/EM&gt;, converted internally to a timestamp by adding &lt;CODE&gt;00:00:00&lt;/CODE&gt; to it.&lt;/LI&gt;
&lt;/UL&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Now, let's do an example search:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;STRONG&gt;With date:&lt;/STRONG&gt; docinf:dateReceived &amp;gt; DATE '2019-08-14'&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;With timestamp:&lt;/STRONG&gt; docinf:dateReceived &amp;gt; TIMESTAMP '2019-08-14 00:00:00'
Both queries should return the same results, but they don't.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;In this test, I only have one document with the following date: 15-08-2019 01:09:09. The problem is that, in my country, we are in GMT+2, so in ElasticSearch I see the following: 2019-08-14T23:09:09.000Z&lt;/P&gt;
&lt;P&gt;Anyway, according to nuxeo documentation, DATE '2019-08-14' and TIMESTAMP '2019-08-14 00:00:00' are exactly the same, and timezone shouldn't be a problem, but that's not true. Am I doing something wrong?&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2019 08:23:12 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/date-and-timestamp-don-apos-t-work-as-expected-in-nxql-queries/m-p/322566#M9567</guid>
      <dc:creator>Rodri_</dc:creator>
      <dc:date>2019-08-23T08:23:12Z</dc:date>
    </item>
  </channel>
</rss>

