<?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 Re: Date problem/bug in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Date-problem-bug/m-p/792508#M665414</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As Ashfaq indicates the problem could be that there is also a timestamp in &lt;SPAN style="color: #3366ff; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Bokföringsdatum.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Date()-function does not round the date, it just formats it. It is a Dual() that will contain both the text date and the date as a number. If that number is 41670,01 in one and 41670,03 in another, they will both have 2014-01-31 as their textual representation but will be two different "dates".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The solution is to round them both down to start of the day. This is done with &lt;SPAN style="color: #3366ff; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Date(Floor(ISODate, 'YYYY-MM-DD')) As Bokföringsdatum&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 08 Dec 2014 09:08:35 GMT</pubDate>
    <dc:creator>simenkg</dc:creator>
    <dc:date>2014-12-08T09:08:35Z</dc:date>
    <item>
      <title>Date problem/bug</title>
      <link>https://community.qlik.com/t5/QlikView/Date-problem-bug/m-p/792506#M665412</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;H&lt;SPAN style="color: #575757;"&gt;i everyone,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757;"&gt;I have now experienced a problem with dates that I have never seen before... I get different date values in the load of my fact table, even though I use the Date() function, and it's the same source. It's also the same date format in this source, and there are only a few transactions that gets "another" date. I can point out that fact when selecting two different values (of the same date in my current selections:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757;"&gt;&lt;IMG alt="current_selections.JPG.jpg" class="jive-image" src="https://community.qlik.com/legacyfs/online/72957_current_selections.JPG.jpg" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757;"&gt;Here is my code:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;Fact:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;Load&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; RecNo() As Recno,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date(MyDate, 'YYYY-MM-DD') As Bokföringsdatum,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ... more fields ...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;FROM MySource.qvd (qvd);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;Calendar:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;Load&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date(ISODate, 'YYYY-MM-DD') As Bokföringsdatum,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Year(ISODate) As MyYear,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Month(ISODate) As MyMonth&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;FROM MyCalendar.qvd (qvd);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Of course I want only one value of my date 2014-01-31... As it is now, only one of these values matches to my Calendar table, and the transactions with the "wrong" date format, doesn't get Year or Month values...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope you can understand my problem, and hopes of any solution to this.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Best regards,&lt;/P&gt;&lt;P&gt;Filip&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Dec 2014 08:55:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-problem-bug/m-p/792506#M665412</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-12-08T08:55:18Z</dc:date>
    </item>
    <item>
      <title>Re: Date problem/bug</title>
      <link>https://community.qlik.com/t5/QlikView/Date-problem-bug/m-p/792507#M665413</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try like below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #3366ff;"&gt;Fact:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #3366ff;"&gt;Load&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #3366ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; RecNo() As Recno,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #3366ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date(floor(MyDate), 'YYYY-MM-DD') As Bokföringsdatum,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #3366ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ... &lt;SPAN class="jo25se2z6" style="font-style: inherit; font-family: inherit; margin: 0 !important; padding: 0 !important; border-bottom-width: 1px !important; text-decoration: underline !important; color: #d50000 !important;"&gt;more&lt;/SPAN&gt; fields ...&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #3366ff;"&gt;FROM MySource.qvd (qvd);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #3366ff;"&gt;Calendar:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #3366ff;"&gt;Load&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #3366ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date(floor(ISODate), 'YYYY-MM-DD') As Bokföringsdatum,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #3366ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Year(ISODate) As MyYear,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #3366ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Month(ISODate) As MyMonth&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #3366ff;"&gt;FROM MyCalendar.qvd (qvd);&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Dec 2014 09:01:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-problem-bug/m-p/792507#M665413</guid>
      <dc:creator>ashfaq_haseeb</dc:creator>
      <dc:date>2014-12-08T09:01:34Z</dc:date>
    </item>
    <item>
      <title>Re: Date problem/bug</title>
      <link>https://community.qlik.com/t5/QlikView/Date-problem-bug/m-p/792508#M665414</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As Ashfaq indicates the problem could be that there is also a timestamp in &lt;SPAN style="color: #3366ff; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Bokföringsdatum.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Date()-function does not round the date, it just formats it. It is a Dual() that will contain both the text date and the date as a number. If that number is 41670,01 in one and 41670,03 in another, they will both have 2014-01-31 as their textual representation but will be two different "dates".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The solution is to round them both down to start of the day. This is done with &lt;SPAN style="color: #3366ff; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Date(Floor(ISODate, 'YYYY-MM-DD')) As Bokföringsdatum&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Dec 2014 09:08:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-problem-bug/m-p/792508#M665414</guid>
      <dc:creator>simenkg</dc:creator>
      <dc:date>2014-12-08T09:08:35Z</dc:date>
    </item>
    <item>
      <title>Re: Date problem/bug</title>
      <link>https://community.qlik.com/t5/QlikView/Date-problem-bug/m-p/792509#M665415</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi try to use &lt;/P&gt;&lt;P&gt;date# function for the same syntax &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;like &lt;/P&gt;&lt;P&gt;date(date#(filed,'data format'), 'Required format)&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Dec 2014 09:08:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-problem-bug/m-p/792509#M665415</guid>
      <dc:creator />
      <dc:date>2014-12-08T09:08:55Z</dc:date>
    </item>
    <item>
      <title>Re: Date problem/bug</title>
      <link>https://community.qlik.com/t5/QlikView/Date-problem-bug/m-p/792510#M665416</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try with&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;Fact:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;Load&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; RecNo() As Recno,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date(Date#(MyDate, 'YYYY-MM-DD')&lt;SPAN style="color: #3366ff;"&gt;, 'YYYY-MM-DD')&lt;/SPAN&gt; As Bokföringsdatum,&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ... more fields ...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;FROM MySource.qvd (qvd);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;and how you create your calendar let me know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anand&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Dec 2014 09:13:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-problem-bug/m-p/792510#M665416</guid>
      <dc:creator>its_anandrjs</dc:creator>
      <dc:date>2014-12-08T09:13:11Z</dc:date>
    </item>
    <item>
      <title>Re: Date problem/bug</title>
      <link>https://community.qlik.com/t5/QlikView/Date-problem-bug/m-p/792511#M665417</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot for the quick response. The Floor() function solves the my problem &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Dec 2014 09:13:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-problem-bug/m-p/792511#M665417</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-12-08T09:13:31Z</dc:date>
    </item>
    <item>
      <title>Re: Date problem/bug</title>
      <link>https://community.qlik.com/t5/QlikView/Date-problem-bug/m-p/792512#M665418</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This blog by &lt;A href="https://community.qlik.com/qlik-users/4003"&gt;Henric Cronström&lt;/A&gt; shows how to correctly format dates, and the difference&amp;nbsp; between the Date#() and Date() functions.&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/blogs/qlikviewdesignblog/2014/12/02/the-date-function"&gt;http://community.qlik.com/blogs/qlikviewdesignblog/2014/12/02/the-date-function&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Dec 2014 09:15:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-problem-bug/m-p/792512#M665418</guid>
      <dc:creator>Colin-Albert</dc:creator>
      <dc:date>2014-12-08T09:15:39Z</dc:date>
    </item>
  </channel>
</rss>

