<?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: Working with dates and auto increment in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Working-with-dates-and-auto-increment/m-p/795506#M281064</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See attached qvw.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 29 Dec 2014 15:32:54 GMT</pubDate>
    <dc:creator>Gysbert_Wassenaar</dc:creator>
    <dc:date>2014-12-29T15:32:54Z</dc:date>
    <item>
      <title>Working with dates and auto increment</title>
      <link>https://community.qlik.com/t5/QlikView/Working-with-dates-and-auto-increment/m-p/795503#M281061</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;floor((Today() - Date([Date],'D-MMM-YYYY'))/&lt;STRONG style="color: #ff0000;"&gt;365&lt;/STRONG&gt;) &amp;amp;' Years, ' &amp;amp;&amp;nbsp; floor(Frac((Today() - Date([Date],'D-MMM-YYYY'))/&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;365)*12&lt;/STRONG&gt;&lt;/SPAN&gt;) &amp;amp;' Months, '&amp;amp; num(frac(Frac((Today() - Date([Date],'D-MMM-YYYY'))/&lt;STRONG style="color: #ff0000;"&gt;365)*12)*30&lt;/STRONG&gt;,'#,##0') &amp;amp; ' Days'&amp;nbsp; as [Date spent]&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Check this code segment. Am calculating subtraction of a date from present date; &lt;STRONG&gt;Year&lt;/STRONG&gt;, &lt;STRONG&gt;Month&lt;/STRONG&gt; and &lt;STRONG&gt;Day &lt;/STRONG&gt;But there is a problem dealing with &lt;STRONG&gt;Leap-Year,&lt;/STRONG&gt; and&lt;STRONG&gt; Months &lt;/STRONG&gt;having up to&lt;STRONG&gt; 31 &lt;/STRONG&gt;days. How do i resolve this? Check code segment very well.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Dec 2014 09:11:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Working-with-dates-and-auto-increment/m-p/795503#M281061</guid>
      <dc:creator />
      <dc:date>2014-12-29T09:11:59Z</dc:date>
    </item>
    <item>
      <title>Re: Working with dates and auto increment</title>
      <link>https://community.qlik.com/t5/QlikView/Working-with-dates-and-auto-increment/m-p/795504#M281062</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perhaps like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Year(Today()) - Year( [Date]) + (DayNumberOfYear(Today())&amp;lt;DayNumberOfYear([Date])) &amp;amp; ' Years' &amp;amp;&lt;/P&gt;&lt;P&gt;Month(Today()) - Month( [Date]) - 12 * (DayNumberOfYear(Today())&amp;lt;DayNumberOfYear([Date])) &amp;amp; ' Months' &amp;amp;&lt;/P&gt;&lt;P&gt;Day(Today()) - Day([Date]) - Day(MonthEnd([Date])) * (Day(Today())&amp;lt;Day([Date])) &amp;amp; ' Days' AS [Date Spent]&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Dec 2014 10:13:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Working-with-dates-and-auto-increment/m-p/795504#M281062</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2014-12-29T10:13:50Z</dc:date>
    </item>
    <item>
      <title>Re: Working with dates and auto increment</title>
      <link>https://community.qlik.com/t5/QlikView/Working-with-dates-and-auto-increment/m-p/795505#M281063</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I implemented, attached didnt give what i wanted to achieve. [Date spent1] field worked but need to resolve the issues mention above. Find attached&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Dec 2014 10:42:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Working-with-dates-and-auto-increment/m-p/795505#M281063</guid>
      <dc:creator />
      <dc:date>2014-12-29T10:42:03Z</dc:date>
    </item>
    <item>
      <title>Re: Working with dates and auto increment</title>
      <link>https://community.qlik.com/t5/QlikView/Working-with-dates-and-auto-increment/m-p/795506#M281064</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See attached qvw.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Dec 2014 15:32:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Working-with-dates-and-auto-increment/m-p/795506#M281064</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2014-12-29T15:32:54Z</dc:date>
    </item>
  </channel>
</rss>

