<?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: Difference between two dates in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Difference-between-two-dates/m-p/1112869#M633850</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Awesome, I am glad you were finally able to figure it out.&lt;/P&gt;&lt;P&gt;Please close the thread down by marking correct and helpful responses if you think you have got what you needed.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/docs/DOC-14806"&gt;Qlik Community Tip: Marking Replies as Correct or Helpful&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 08 Jul 2016 14:41:40 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2016-07-08T14:41:40Z</dc:date>
    <item>
      <title>Difference between two dates</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-between-two-dates/m-p/1112857#M633832</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am struggling in my current doc (import from excel) to fin the difference between two dates. i have this working fine in 1 doc&lt;/P&gt;&lt;P&gt;date((date("step_date",'MM/DD/YYY')-date(create_date,'MM/DD/YYYY')),'DD')*1&lt;/P&gt;&lt;P&gt;However, when i transpose this to another doc and change fields it returns null -&lt;/P&gt;&lt;P&gt;here is the transposed code:&lt;/P&gt;&lt;P&gt;date((date(Date_Imported,'MM/DD/YYY')-date([Date Ordered],'MM/DD/YYYY')),'DD')*1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The format of the date for both fields being imported from excel is like so&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 13.3333px;"&gt;7/6/2016 12:00:00 AM&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am really struggling to see the difference and why this is not working:&lt;/P&gt;&lt;P&gt;here is the load SET&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET ThousandSep=',';&lt;/P&gt;&lt;P&gt;SET DecimalSep='.';&lt;/P&gt;&lt;P&gt;SET MoneyThousandSep=',';&lt;/P&gt;&lt;P&gt;SET MoneyDecimalSep='.';&lt;/P&gt;&lt;P&gt;SET MoneyFormat='£#,##0.00;-£#,##0.00';&lt;/P&gt;&lt;P&gt;SET TimeFormat='hh:mm:ss';&lt;/P&gt;&lt;P&gt;SET DateFormat='MM/DD/YYYY';&lt;/P&gt;&lt;P&gt;SET TimestampFormat='MM/DD/YYYY hh:mm:ss[.fff]';&lt;/P&gt;&lt;P&gt;SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and the sheet it is being loaded from&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD TEST_Order_No as [Order Reference],&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Supplier_Code,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //[Suplier Name] as [Supplier Name], &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Web_Order_No,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Date_Imported, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date_Order as [Date Ordered], &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; order_status, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Tracking_Status, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; locationCode as [TEST Location],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Item No.] as [TEST ITem Ref],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Item Type]&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;K:\....................&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you so much, i really hope you can help with this.....So annoying as i had it working before.&lt;/P&gt;&lt;P&gt;Rgds&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jul 2016 16:30:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-between-two-dates/m-p/1112857#M633832</guid>
      <dc:creator>davyqliks</dc:creator>
      <dc:date>2016-07-07T16:30:24Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between two dates</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-between-two-dates/m-p/1112858#M633833</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you try this:&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: 13px;"&gt;&lt;STRONG&gt;Interval([step_date] - [create_date],'D') as Difference&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jul 2016 17:17:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-between-two-dates/m-p/1112858#M633833</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-07-07T17:17:51Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between two dates</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-between-two-dates/m-p/1112859#M633834</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Or just this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Floor(step_date) - Floor(created_date) as Difference&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jul 2016 17:18:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-between-two-dates/m-p/1112859#M633834</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-07-07T17:18:20Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between two dates</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-between-two-dates/m-p/1112860#M633835</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why not simply use the date#() function!&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: 13px;"&gt;date#(Date_Imported,'MM/DD/YYYY')-date#([Date Ordered],'MM/DD/YYYY')&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jul 2016 20:41:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-between-two-dates/m-p/1112860#M633835</guid>
      <dc:creator>boorgura</dc:creator>
      <dc:date>2016-07-07T20:41:39Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between two dates</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-between-two-dates/m-p/1112861#M633836</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try&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: 12px;"&gt;date&lt;STRONG&gt;((date#(Da&lt;/STRONG&gt;te_Imported,'MM/DD/YYY')&lt;STRONG&gt;-date(Date#([D&lt;/STRONG&gt;ate Ordered],'MM/DD/YYYY')),'DD'))*1&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jul 2016 05:19:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-between-two-dates/m-p/1112861#M633836</guid>
      <dc:creator>Chanty4u</dc:creator>
      <dc:date>2016-07-08T05:19:51Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between two dates</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-between-two-dates/m-p/1112862#M633837</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;all above solutions are correct&lt;/P&gt;&lt;P&gt;else you try below one&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET DateFormat='DD/MM/YYYY';&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jul 2016 05:31:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-between-two-dates/m-p/1112862#M633837</guid>
      <dc:creator>krishna20</dc:creator>
      <dc:date>2016-07-08T05:31:31Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between two dates</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-between-two-dates/m-p/1112863#M633838</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;This returns a dash&lt;/P&gt;&lt;P&gt;Floor(Date_Imported) - Floor([Date Ordered]) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for the reply Sunny, just trying the other option above&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jul 2016 13:45:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-between-two-dates/m-p/1112863#M633838</guid>
      <dc:creator>davyqliks</dc:creator>
      <dc:date>2016-07-08T13:45:50Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between two dates</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-between-two-dates/m-p/1112864#M633839</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;THank you,&lt;/P&gt;&lt;P&gt;I have just tried this and it returns a dash&lt;/P&gt;&lt;P&gt;Interval(Date_Imported - [Date Ordered],'D') &lt;/P&gt;&lt;P&gt;Thank you for the reply..... Any idea what i am doing wrong here?&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jul 2016 13:47:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-between-two-dates/m-p/1112864#M633839</guid>
      <dc:creator>davyqliks</dc:creator>
      <dc:date>2016-07-08T13:47:53Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between two dates</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-between-two-dates/m-p/1112865#M633842</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you so much for the reply but this returns error in expression :&lt;/P&gt;&lt;P&gt;date((date#(Date_Imported,'MM/DD/YYY')- date(Date#([Date Ordered],'MM/DD/YYYY')),'DD'))*1&lt;/P&gt;&lt;P&gt;')' expected&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jul 2016 13:52:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-between-two-dates/m-p/1112865#M633842</guid>
      <dc:creator>davyqliks</dc:creator>
      <dc:date>2016-07-08T13:52:42Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between two dates</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-between-two-dates/m-p/1112866#M633846</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thank you for the reply. Please can you explain what this is achieving&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; line-height: 1.5em; background-color: #f2f2f2;"&gt;SET DateFormat='DD/MM/YYYY';&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: 12px; line-height: 1.5em; background-color: #f2f2f2;"&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: 12px; line-height: 1.5em; background-color: #f2f2f2;"&gt;I have added to the load script&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: 12px; line-height: 1.5em; background-color: #f2f2f2;"&gt;Thank you&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: 12px; line-height: 1.5em; background-color: #f2f2f2;"&gt;Daniel&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jul 2016 14:00:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-between-two-dates/m-p/1112866#M633846</guid>
      <dc:creator>davyqliks</dc:creator>
      <dc:date>2016-07-08T14:00:51Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between two dates</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-between-two-dates/m-p/1112867#M633848</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is this not working?&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;date#(Date_Imported,'MM/DD/YYYY')-date#([Date Ordered],'MM/DD/YYYY')&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: 13px;"&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: 13px;"&gt;or num((&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;date#(Date_Imported,'MM/DD/YYYY')-date#([Date Ordered],'MM/DD/YYYY'))&lt;/SPAN&gt;)&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jul 2016 14:01:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-between-two-dates/m-p/1112867#M633848</guid>
      <dc:creator>boorgura</dc:creator>
      <dc:date>2016-07-08T14:01:45Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between two dates</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-between-two-dates/m-p/1112868#M633849</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;Thank you all for the replies. I'm sure they all worked but the actual problem stopping me from seeing the corrct result is in the load time stamp. This&lt;/P&gt;&lt;P&gt;SET TimestampFormat='MM/DD/YYYY hh:mm:ss[.fff] TT';&lt;/P&gt;&lt;P&gt;Was missing the TT from the time format and so date i suppose was not recognised as date.&lt;/P&gt;&lt;P&gt;I have now used the Sunny solution.&lt;/P&gt;&lt;P&gt;Thank you again guys, your help helped me to get there on my own &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jul 2016 14:13:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-between-two-dates/m-p/1112868#M633849</guid>
      <dc:creator>davyqliks</dc:creator>
      <dc:date>2016-07-08T14:13:23Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between two dates</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-between-two-dates/m-p/1112869#M633850</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Awesome, I am glad you were finally able to figure it out.&lt;/P&gt;&lt;P&gt;Please close the thread down by marking correct and helpful responses if you think you have got what you needed.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/docs/DOC-14806"&gt;Qlik Community Tip: Marking Replies as Correct or Helpful&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jul 2016 14:41:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-between-two-dates/m-p/1112869#M633850</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-07-08T14:41:40Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between two dates</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-between-two-dates/m-p/1112870#M633851</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Of course, Thank you so much for your assistance Suny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jul 2016 09:38:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-between-two-dates/m-p/1112870#M633851</guid>
      <dc:creator>davyqliks</dc:creator>
      <dc:date>2016-07-11T09:38:25Z</dc:date>
    </item>
  </channel>
</rss>

