<?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 difference in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/date-difference/m-p/165696#M37928</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thank you all guys, the floor function seem to have done the trick,&lt;/P&gt;&lt;P&gt;I dont understand why the date#(Date,'format') didnt work on running data. if i use type in the dates it works but not if i use a column name.&lt;/P&gt;&lt;P&gt;This is working&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;avg&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;if((not isnull(DateCreated) and not isnull(DateIssued)),(floor(DateIssued)-floor(DateCreated)),null&lt;STRONG&gt;()))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Thanks guys.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 27 May 2010 07:15:43 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-05-27T07:15:43Z</dc:date>
    <item>
      <title>date difference</title>
      <link>https://community.qlik.com/t5/QlikView/date-difference/m-p/165692#M37924</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;Good day,&lt;BR /&gt;I would like to have a date diff function in an expression. im getting a weird answer. say&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;date&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;2010/10/10) -date(2010/10/11), im getting 1.82727272. does anyone know whats wrong here.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Regards.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 May 2010 13:06:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/date-difference/m-p/165692#M37924</guid>
      <dc:creator />
      <dc:date>2010-05-26T13:06:09Z</dc:date>
    </item>
    <item>
      <title>date difference</title>
      <link>https://community.qlik.com/t5/QlikView/date-difference/m-p/165693#M37925</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try using:&lt;/P&gt;&lt;P&gt;date#('2010/10/11', 'YYYY/MM/DD') - Date#('2010/10/10', 'YYYY/MM/DD')&lt;/P&gt;&lt;P&gt;It gives the number of days difference.&lt;/P&gt;&lt;P&gt;You can also try the interval function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if it works.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 May 2010 13:22:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/date-difference/m-p/165693#M37925</guid>
      <dc:creator>boorgura</dc:creator>
      <dc:date>2010-05-26T13:22:22Z</dc:date>
    </item>
    <item>
      <title>date difference</title>
      <link>https://community.qlik.com/t5/QlikView/date-difference/m-p/165694#M37926</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Dates are stored with days in the integer part, time in the fractional part of the number. The example calculatation you show has obviously the time in at least one of the values included. You can get rid of the time (fractional part) with floor, ceil or round, depending on what you want to achieve.&lt;/P&gt;&lt;P&gt;You can also just floor the result to get the number of days but it will return 0 for a part of a day difference.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Jürg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 May 2010 13:28:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/date-difference/m-p/165694#M37926</guid>
      <dc:creator />
      <dc:date>2010-05-26T13:28:28Z</dc:date>
    </item>
    <item>
      <title>date difference</title>
      <link>https://community.qlik.com/t5/QlikView/date-difference/m-p/165695#M37927</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;if i try to add an average function on this date format, it just seems not to work, Does anyone know whats wrong with this expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;avg&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;if((not isnull(DateCreated) and not isnull(DateIssued)),(date#(DateIssued,'YYYY/MM/DD')-date#(DateCreated,'YYYY/MM/DD')),null&lt;STRONG&gt;()))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 May 2010 07:06:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/date-difference/m-p/165695#M37927</guid>
      <dc:creator />
      <dc:date>2010-05-27T07:06:14Z</dc:date>
    </item>
    <item>
      <title>date difference</title>
      <link>https://community.qlik.com/t5/QlikView/date-difference/m-p/165696#M37928</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thank you all guys, the floor function seem to have done the trick,&lt;/P&gt;&lt;P&gt;I dont understand why the date#(Date,'format') didnt work on running data. if i use type in the dates it works but not if i use a column name.&lt;/P&gt;&lt;P&gt;This is working&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;avg&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;if((not isnull(DateCreated) and not isnull(DateIssued)),(floor(DateIssued)-floor(DateCreated)),null&lt;STRONG&gt;()))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Thanks guys.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 May 2010 07:15:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/date-difference/m-p/165696#M37928</guid>
      <dc:creator />
      <dc:date>2010-05-27T07:15:43Z</dc:date>
    </item>
    <item>
      <title>date difference</title>
      <link>https://community.qlik.com/t5/QlikView/date-difference/m-p/165697#M37929</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use diff function in macro editor&lt;/P&gt;&lt;P&gt;function datediff2(d1,d2)&lt;BR /&gt;datediff2=datediff("D",d1,d2)&lt;BR /&gt;end function&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And than call this function in qlikview editor&lt;/P&gt;&lt;P&gt;datediff2(Date1,Date2) it no of day between date1 and date2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Ashish&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 May 2010 07:34:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/date-difference/m-p/165697#M37929</guid>
      <dc:creator />
      <dc:date>2010-05-27T07:34:29Z</dc:date>
    </item>
  </channel>
</rss>

