<?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 Help with Dates in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Help-with-Dates/m-p/222083#M74829</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Looking for some help on dates...&lt;/P&gt;&lt;P&gt;I have a field called "pdr_DueDateBasis" which, depending on the receipt status, is either our actual receipt date or an estimated receipt date for goods in transit to us.&lt;/P&gt;&lt;P&gt;Using my vendor business terms table, I am trying to work out when payment is due based on this field.&lt;/P&gt;&lt;P&gt;The scenario (of which there are many) I am working on revolves around two further fields...&lt;/P&gt;&lt;P&gt;bus_ProxyDiscountDayOfMonth e.g. 15&lt;/P&gt;&lt;P&gt;bus_ProxyDiscountMonthPlus e.g. 2&lt;/P&gt;&lt;P&gt;So if I had a receipt date of 04/02/2011 (dd/mm/yyyy format) my payment due date using the above example figures would be the 15/04/2011.&lt;/P&gt;&lt;P&gt;My "If" statement to try and construct this date in my script is as follows...&lt;/P&gt;&lt;P&gt;*** Code Starts ***&lt;/P&gt;&lt;P&gt;IF(bus_Proxy = 'Yes' AND bus_ProxyDiscountFixedDate = 'Blank' AND bus_ProxyDiscountDayOfMonth &amp;lt;&amp;gt; 31,&lt;BR /&gt;&lt;BR /&gt; Date(&lt;BR /&gt;&lt;BR /&gt; // Day&lt;BR /&gt;&lt;BR /&gt; bus_ProxyDiscountDayOfMonth &amp;amp; '/' &amp;amp;&lt;BR /&gt;&lt;BR /&gt; // Month and Year&lt;BR /&gt;&lt;BR /&gt; addmonths(Date(pdr_DateDueBasis, 'MM/YYYY'), bus_ProxyDiscountMonthPlus)&lt;/P&gt;&lt;P&gt;, 'DD/MM/YYYY')&lt;/P&gt;&lt;P&gt;*** Code Ends ***&lt;/P&gt;&lt;P&gt;Any assitance greatly appreciated...&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 18 Feb 2011 16:39:47 GMT</pubDate>
    <dc:creator>pkelly</dc:creator>
    <dc:date>2011-02-18T16:39:47Z</dc:date>
    <item>
      <title>Help with Dates</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Dates/m-p/222083#M74829</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Looking for some help on dates...&lt;/P&gt;&lt;P&gt;I have a field called "pdr_DueDateBasis" which, depending on the receipt status, is either our actual receipt date or an estimated receipt date for goods in transit to us.&lt;/P&gt;&lt;P&gt;Using my vendor business terms table, I am trying to work out when payment is due based on this field.&lt;/P&gt;&lt;P&gt;The scenario (of which there are many) I am working on revolves around two further fields...&lt;/P&gt;&lt;P&gt;bus_ProxyDiscountDayOfMonth e.g. 15&lt;/P&gt;&lt;P&gt;bus_ProxyDiscountMonthPlus e.g. 2&lt;/P&gt;&lt;P&gt;So if I had a receipt date of 04/02/2011 (dd/mm/yyyy format) my payment due date using the above example figures would be the 15/04/2011.&lt;/P&gt;&lt;P&gt;My "If" statement to try and construct this date in my script is as follows...&lt;/P&gt;&lt;P&gt;*** Code Starts ***&lt;/P&gt;&lt;P&gt;IF(bus_Proxy = 'Yes' AND bus_ProxyDiscountFixedDate = 'Blank' AND bus_ProxyDiscountDayOfMonth &amp;lt;&amp;gt; 31,&lt;BR /&gt;&lt;BR /&gt; Date(&lt;BR /&gt;&lt;BR /&gt; // Day&lt;BR /&gt;&lt;BR /&gt; bus_ProxyDiscountDayOfMonth &amp;amp; '/' &amp;amp;&lt;BR /&gt;&lt;BR /&gt; // Month and Year&lt;BR /&gt;&lt;BR /&gt; addmonths(Date(pdr_DateDueBasis, 'MM/YYYY'), bus_ProxyDiscountMonthPlus)&lt;/P&gt;&lt;P&gt;, 'DD/MM/YYYY')&lt;/P&gt;&lt;P&gt;*** Code Ends ***&lt;/P&gt;&lt;P&gt;Any assitance greatly appreciated...&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Feb 2011 16:39:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Dates/m-p/222083#M74829</guid>
      <dc:creator>pkelly</dc:creator>
      <dc:date>2011-02-18T16:39:47Z</dc:date>
    </item>
    <item>
      <title>Help with Dates</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Dates/m-p/222084#M74830</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is make date a better approach for this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Feb 2011 20:01:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Dates/m-p/222084#M74830</guid>
      <dc:creator>pkelly</dc:creator>
      <dc:date>2011-02-18T20:01:12Z</dc:date>
    </item>
    <item>
      <title>Help with Dates</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Dates/m-p/222085#M74831</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Finally got it....&lt;/P&gt;&lt;P&gt;Used...&lt;/P&gt;&lt;P&gt;IF(bus_Proxy = 'Yes' AND bus_ProxyDiscountFixedDate = 'Blank' AND bus_ProxyDiscountDayOfMonth &amp;lt;&amp;gt; 31,&lt;BR /&gt; makedate(&lt;BR /&gt; Year(addmonths(Date(pdr_DateDueBasis, 'DD/MM/YYYY'), bus_ProxyDiscountMonthPlus)),&lt;BR /&gt; Month(addmonths(Date(pdr_DateDueBasis, 'DD/MM/YYYY'), bus_ProxyDiscountMonthPlus)),&lt;BR /&gt; bus_ProxyDiscountDayOfMonth)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Feb 2011 09:23:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Dates/m-p/222085#M74831</guid>
      <dc:creator>pkelly</dc:creator>
      <dc:date>2011-02-21T09:23:23Z</dc:date>
    </item>
  </channel>
</rss>

