<?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 How to Add Value (integer) to Date in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-Add-Value-integer-to-Date/m-p/793772#M280576</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have Date in the following format&amp;nbsp; 'D/MMM/YYYY' in a field called Date i want to add 20 years in value to it. Use this scenario&lt;/P&gt;&lt;P&gt;(Date, 'D/MMM/YYYY') + 20 years.&lt;/P&gt;&lt;P&gt;Just the addition of 20 more years in integer to the Date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 28 Dec 2014 17:45:40 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-12-28T17:45:40Z</dc:date>
    <item>
      <title>How to Add Value (integer) to Date</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-Add-Value-integer-to-Date/m-p/793772#M280576</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have Date in the following format&amp;nbsp; 'D/MMM/YYYY' in a field called Date i want to add 20 years in value to it. Use this scenario&lt;/P&gt;&lt;P&gt;(Date, 'D/MMM/YYYY') + 20 years.&lt;/P&gt;&lt;P&gt;Just the addition of 20 more years in integer to the Date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 28 Dec 2014 17:45:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-Add-Value-integer-to-Date/m-p/793772#M280576</guid>
      <dc:creator />
      <dc:date>2014-12-28T17:45:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to Add Value (integer) to Date</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-Add-Value-integer-to-Date/m-p/793773#M280577</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;Use Addmonths function add 20 years to the current field&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ex:-&lt;/P&gt;&lt;P&gt;=AddMonths( Date(Date#( '28/Dec/2014' ,'D/MMM/YYYY'),'D/MMM/YYYY'),240)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or Add the New Field in the load script&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;Date,&lt;/P&gt;&lt;P&gt;AddMonths(Date,240) as YearsAdd20&lt;/P&gt;&lt;P&gt;From Source;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;Date,&lt;/P&gt;&lt;P&gt;Date(AddMonths(Date,240),'D/MMM/YYYY') as YearsAdd20&lt;/P&gt;&lt;P&gt;From Source;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anand&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 28 Dec 2014 18:05:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-Add-Value-integer-to-Date/m-p/793773#M280577</guid>
      <dc:creator>its_anandrjs</dc:creator>
      <dc:date>2014-12-28T18:05:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to Add Value (integer) to Date</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-Add-Value-integer-to-Date/m-p/793774#M280578</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good Anand,&lt;/P&gt;&lt;P&gt;How do i subract a previous date with format 'D-MMM-YYYY' from today? To get the number of "Years, Month and Days" in this format example "2 years, 6 months and 2 days"&lt;/P&gt;&lt;P&gt;Any idea?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 28 Dec 2014 18:25:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-Add-Value-integer-to-Date/m-p/793774#M280578</guid>
      <dc:creator />
      <dc:date>2014-12-28T18:25:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to Add Value (integer) to Date</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-Add-Value-integer-to-Date/m-p/793775#M280579</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;For this you have to convert the Today() date format to 'D-MMM-YYYY' and then add new field into load script for the calculation of the Years, Month and Days. Take difference of Year then month and then for days and concatenate all fields to get single field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_text_macro _jivemacro_uid_14198002040509096 jive_macro_code" jivemacro_uid="_14198002040509096" modifiedtitle="true"&gt;
&lt;P&gt;Source:&lt;/P&gt;
&lt;P&gt;LOAD *,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (Year(Date(Today(),'D-MMM-YYYY')) - Year(DATE))&amp;amp;' Years '&amp;amp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (Month(Date(Today(),'D-MMM-YYYY'))- Month(DATE)+(Year(Date(Today(),'D-MMM-YYYY'))-Year(DATE))*12)&amp;amp;' Months and '&amp;amp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Interval(Date(Today(),'D-MMM-YYYY') - DATE,'D')&amp;amp;' Days '&amp;nbsp;&amp;nbsp; as DateDetails&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Resident tmpSource;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Drop Table tmpSource;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And you get field with&lt;/P&gt;&lt;P&gt;&lt;IMG alt="DayDetails.png" class="image-1 jive-image" src="https://community.qlik.com/legacyfs/online/74303_DayDetails.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anand&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 28 Dec 2014 21:02:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-Add-Value-integer-to-Date/m-p/793775#M280579</guid>
      <dc:creator>its_anandrjs</dc:creator>
      <dc:date>2014-12-28T21:02:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to Add Value (integer) to Date</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-Add-Value-integer-to-Date/m-p/793776#M280580</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Anand,&lt;/P&gt;&lt;P&gt;No this isnt what i wanna achieve.&lt;/P&gt;&lt;P&gt;SCENARIO:&lt;/P&gt;&lt;P&gt;Today() - December 1st 2000 =&lt;SPAN style="text-decoration: underline;"&gt; "14 years, and 27 days"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is what i want to achieve&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 28 Dec 2014 22:11:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-Add-Value-integer-to-Date/m-p/793776#M280580</guid>
      <dc:creator />
      <dc:date>2014-12-28T22:11:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to Add Value (integer) to Date</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-Add-Value-integer-to-Date/m-p/793777#M280581</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Read this thread, its been solved already. I believe a VB function linked thru the Module is enough and you can call it from wherever you want in your document.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Dec 2014 00:19:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-Add-Value-integer-to-Date/m-p/793777#M280581</guid>
      <dc:creator />
      <dc:date>2014-12-29T00:19:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to Add Value (integer) to Date</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-Add-Value-integer-to-Date/m-p/793778#M280582</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use Like This&lt;/P&gt;&lt;P&gt;&amp;nbsp; floor((Today() -Date_of_Loss)/365) &amp;amp;' Years ' &amp;amp;&amp;nbsp;&amp;nbsp; floor(Frac((Today() -Date_of_Loss)/365)*12) &amp;amp;' Months '&amp;amp; frac(Frac((Today() -Date_of_Loss)/365)*12)*30 &amp;amp; ' Days'&amp;nbsp; as Date,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" height="44" style="width: 277px; height: 45px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl63" height="17" width="81"&gt;08/06/2010&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="134"&gt;4 Years 4 Months 24 Days&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Regards&lt;/P&gt;&lt;P&gt;Vimlesh Gupta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Dec 2014 07:24:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-Add-Value-integer-to-Date/m-p/793778#M280582</guid>
      <dc:creator />
      <dc:date>2014-12-29T07:24:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to Add Value (integer) to Date</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-Add-Value-integer-to-Date/m-p/793779#M280583</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Will this code work for a Leap-Year?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Dec 2014 07:33:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-Add-Value-integer-to-Date/m-p/793779#M280583</guid>
      <dc:creator />
      <dc:date>2014-12-29T07:33:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to Add Value (integer) to Date</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-Add-Value-integer-to-Date/m-p/793780#M280584</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes ,You can create Leap-year using it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Feb 2015 10:41:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-Add-Value-integer-to-Date/m-p/793780#M280584</guid>
      <dc:creator />
      <dc:date>2015-02-02T10:41:01Z</dc:date>
    </item>
  </channel>
</rss>

