<?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 calculate date based on future age in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/calculate-date-based-on-future-age/m-p/743538#M1032144</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is my challenge.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a DOB for a client.&amp;nbsp; I need to calculate the correct date based on their future age.&amp;nbsp; For example person is born on 12/31/1975.&amp;nbsp; I need to know the future date when they turn 12 years and 6 months old.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried just adding 150 months to their DOB.&amp;nbsp; That works most of the time.&amp;nbsp; But in this example it doesn't work because it put the date in June that only has 30 days.&amp;nbsp; So my calculation will show June 30 1987.&amp;nbsp; It should actually show a day in July.&amp;nbsp; So just adding months does not take into account the number of days in each month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What can I do?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 04 Feb 2015 13:16:39 GMT</pubDate>
    <dc:creator>rittermd</dc:creator>
    <dc:date>2015-02-04T13:16:39Z</dc:date>
    <item>
      <title>calculate date based on future age</title>
      <link>https://community.qlik.com/t5/QlikView/calculate-date-based-on-future-age/m-p/743538#M1032144</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is my challenge.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a DOB for a client.&amp;nbsp; I need to calculate the correct date based on their future age.&amp;nbsp; For example person is born on 12/31/1975.&amp;nbsp; I need to know the future date when they turn 12 years and 6 months old.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried just adding 150 months to their DOB.&amp;nbsp; That works most of the time.&amp;nbsp; But in this example it doesn't work because it put the date in June that only has 30 days.&amp;nbsp; So my calculation will show June 30 1987.&amp;nbsp; It should actually show a day in July.&amp;nbsp; So just adding months does not take into account the number of days in each month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What can I do?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Feb 2015 13:16:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculate-date-based-on-future-age/m-p/743538#M1032144</guid>
      <dc:creator>rittermd</dc:creator>
      <dc:date>2015-02-04T13:16:39Z</dc:date>
    </item>
    <item>
      <title>Re: calculate date based on future age</title>
      <link>https://community.qlik.com/t5/QlikView/calculate-date-based-on-future-age/m-p/743539#M1032145</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;Maybe add/minus 1 day if number of days in a month is not equal to number of days in a future month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Neetha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Feb 2015 13:21:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculate-date-based-on-future-age/m-p/743539#M1032145</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-02-04T13:21:20Z</dc:date>
    </item>
    <item>
      <title>Re: calculate date based on future age</title>
      <link>https://community.qlik.com/t5/QlikView/calculate-date-based-on-future-age/m-p/743540#M1032146</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you try&lt;/P&gt;&lt;P&gt;=AddMonths('31-2-1975',150)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Feb 2015 13:27:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculate-date-based-on-future-age/m-p/743540#M1032146</guid>
      <dc:creator>robert_mika</dc:creator>
      <dc:date>2015-02-04T13:27:40Z</dc:date>
    </item>
    <item>
      <title>Re: calculate date based on future age</title>
      <link>https://community.qlik.com/t5/QlikView/calculate-date-based-on-future-age/m-p/743541#M1032147</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Depends on what you mean by 12 years and 6 months.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"A month" could mean the number of days the actual calendar month has, and then you should use AddMonths(). But it could also mean e.g. the average month length: 30,43687 days. Similarly, "a year" could be the number of days the calendar says, or it could be 365,2424. (Adding days is simple. Just use Date + &amp;lt;NumberOfDays&amp;gt;.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, just saying 12 years and 6 months is ambiguous. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to define what you mean, and then use a combination of adding years using AddYears(), adding months using AddMonths(), and adding days using simple addition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Feb 2015 13:34:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculate-date-based-on-future-age/m-p/743541#M1032147</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2015-02-04T13:34:40Z</dc:date>
    </item>
  </channel>
</rss>

