<?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: Today() function failing during load in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Today-function-failing-during-load/m-p/508772#M190148</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;see the attached file&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 11 Sep 2013 09:19:06 GMT</pubDate>
    <dc:creator>er_mohit</dc:creator>
    <dc:date>2013-09-11T09:19:06Z</dc:date>
    <item>
      <title>Today() function failing during load</title>
      <link>https://community.qlik.com/t5/QlikView/Today-function-failing-during-load/m-p/508770#M190146</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;I finding the following problem very strange, I have the following statement in loading a table, for records which has greater INVOICE_DUE_DATE&amp;nbsp; than of today, the expression is failing for some reason, even&amp;nbsp; Today_date is coming as null and Invoice_Ageing_Due_Date_Days as null. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt; Today() as Today_date,&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt; if (INVOICE_DUE_DATE &amp;gt; Today(),-1, Interval(Today() - INVOICE_DUE_DATE,'D'))&amp;nbsp; as Invoice_Ageing_Due_Date_Days,&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt; if( Today() &amp;lt; INVOICE_DUE_DATE ,'Not Due',&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt; if(Interval(Today() - INVOICE_DUE_DATE,'D') &amp;lt;= 30,'1-30',&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt; if(Interval(Today() - INVOICE_DUE_DATE,'D') &amp;lt;= 60, '31-60',&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt; if(Interval(Today() - INVOICE_DUE_DATE,'D') &amp;lt;= 90,'61-90','Above 90 Days'&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt; )))) &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt; as Invoice_Ageing_Due_Date,&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Sep 2013 08:47:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Today-function-failing-during-load/m-p/508770#M190146</guid>
      <dc:creator />
      <dc:date>2013-09-11T08:47:38Z</dc:date>
    </item>
    <item>
      <title>Re: Today() function failing during load</title>
      <link>https://community.qlik.com/t5/QlikView/Today-function-failing-during-load/m-p/508771#M190147</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 wrapping your [INVOICE_DUE_DATE] in the Date() function like;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Date([INVOICE_DUE_DATE])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My guess is that the data types of today() and [INVOICE_DUE_DATE] are different.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, it looks as though you're trying to figure out the days difference using the interval() function. I'd advise wrapping the [INVOICE_DUE_DATE] with Floor() to ensure it shows from the beginning of the day like so;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.800000190734863px;"&gt;Interval(Date(Today()) - Date(Floor(INVOICE_DUE_DATE)),'D')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.800000190734863px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.800000190734863px;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.800000190734863px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.800000190734863px;"&gt;Nick&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Sep 2013 08:57:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Today-function-failing-during-load/m-p/508771#M190147</guid>
      <dc:creator />
      <dc:date>2013-09-11T08:57:45Z</dc:date>
    </item>
    <item>
      <title>Re: Today() function failing during load</title>
      <link>https://community.qlik.com/t5/QlikView/Today-function-failing-during-load/m-p/508772#M190148</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;see the attached file&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Sep 2013 09:19:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Today-function-failing-during-load/m-p/508772#M190148</guid>
      <dc:creator>er_mohit</dc:creator>
      <dc:date>2013-09-11T09:19:06Z</dc:date>
    </item>
    <item>
      <title>Re: Today() function failing during load</title>
      <link>https://community.qlik.com/t5/QlikView/Today-function-failing-during-load/m-p/508773#M190149</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, The strange part is that function perform right when date is before the current date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I even tried to use the expression &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Today() &amp;lt; INVOICE_DUE_DATE&lt;/SPAN&gt; to avoid such case, but in that case it failed, moreover the statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE style="border: 0px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;TBODY style="font-style: inherit; font-family: inherit;"&gt;&lt;TR style="border: 0px; font-style: inherit; font-family: inherit;"&gt;&lt;TD style="padding-right: 4px; padding-left: 4px; border: 0px; font-style: inherit; font-family: inherit;"&gt;&lt;/TD&gt;&lt;TD style="padding-right: 4px; padding-left: 4px; border: 0px; font-style: inherit; font-family: inherit;"&gt;Today() as Today_date,&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is a totally a separate statement but that is also returning null for cases like where date is greater than current date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also tried floor() and date() but no avail.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Sep 2013 13:53:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Today-function-failing-during-load/m-p/508773#M190149</guid>
      <dc:creator />
      <dc:date>2013-09-11T13:53:56Z</dc:date>
    </item>
    <item>
      <title>Re: Today() function failing during load</title>
      <link>https://community.qlik.com/t5/QlikView/Today-function-failing-during-load/m-p/508774#M190150</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Problem solved when the data is loaded from QVD instead of Excel. Strange&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/confused.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Sep 2013 14:14:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Today-function-failing-during-load/m-p/508774#M190150</guid>
      <dc:creator />
      <dc:date>2013-09-11T14:14:53Z</dc:date>
    </item>
  </channel>
</rss>

