<?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: do we have RelativeDate function in QV? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/do-we-have-RelativeDate-function-in-QV/m-p/724089#M670985</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;do we have relativeDate function in qlikview,any suggestions pls&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 30 Sep 2014 07:47:26 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-09-30T07:47:26Z</dc:date>
    <item>
      <title>do we have RelativeDate function in QV?</title>
      <link>https://community.qlik.com/t5/QlikView/do-we-have-RelativeDate-function-in-QV/m-p/724088#M670984</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do we have relativeDate function in QV,if we have how we can use it and what is the important of this function.&lt;/P&gt;&lt;P&gt;below variable was in SAP BO format so i am trying convert it into QV.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If [MTO Status]="MTS" Then &lt;STRONG&gt;RelativeDate&lt;/STRONG&gt;([Created on (0CREATEDON)];Round((([Total Replenishment Lead Time])/5)*7;0)ElseIf&amp;nbsp; [MTO Status]="MTO" Then RelativeDate([Created on (0CREATEDON)];Round(((([Total Replenishment Lead Time])/5)*7)+7;0))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Sep 2014 07:20:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/do-we-have-RelativeDate-function-in-QV/m-p/724088#M670984</guid>
      <dc:creator />
      <dc:date>2014-09-30T07:20:14Z</dc:date>
    </item>
    <item>
      <title>Re: do we have RelativeDate function in QV?</title>
      <link>https://community.qlik.com/t5/QlikView/do-we-have-RelativeDate-function-in-QV/m-p/724089#M670985</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;do we have relativeDate function in qlikview,any suggestions pls&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Sep 2014 07:47:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/do-we-have-RelativeDate-function-in-QV/m-p/724089#M670985</guid>
      <dc:creator />
      <dc:date>2014-09-30T07:47:26Z</dc:date>
    </item>
    <item>
      <title>Re: do we have RelativeDate function in QV?</title>
      <link>https://community.qlik.com/t5/QlikView/do-we-have-RelativeDate-function-in-QV/m-p/724090#M670986</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what don't you explain what this function does? Then we maybe can help you...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Sep 2014 07:48:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/do-we-have-RelativeDate-function-in-QV/m-p/724090#M670986</guid>
      <dc:creator>giakoum</dc:creator>
      <dc:date>2014-09-30T07:48:52Z</dc:date>
    </item>
    <item>
      <title>Re: do we have RelativeDate function in QV?</title>
      <link>https://community.qlik.com/t5/QlikView/do-we-have-RelativeDate-function-in-QV/m-p/724091#M670987</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #800000;"&gt;here is the sample example for relativeFunction ,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800000;"&gt;=If(DayName(CurrentDate())=”Monday”;RelativeDate(CurrentDate();-3);If(DayName(CurrentDate())=”Sunday”;RelativeDate(CurrentDate();-2);RelativeDate(CurrentDate();-1)))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Lets break down this formula.&lt;/P&gt;&lt;P&gt;An IF expression has three components:&lt;/P&gt;&lt;P&gt;If(&lt;SPAN style="color: #800000;"&gt;boolean_expr&lt;/SPAN&gt;;&lt;SPAN style="color: #ff6600;"&gt;value if true&lt;/SPAN&gt;;&lt;SPAN style="color: #808000;"&gt;value if false&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;The boolean_expr part is the statement that we test.&lt;/P&gt;&lt;P&gt;In our case, we want to check if the &lt;STRONG&gt;CurrentDate()&lt;/STRONG&gt; is a Monday.&lt;/P&gt;&lt;P&gt;If it is true that it is a Monday, we want to use the &lt;STRONG&gt;RelativeDate&lt;/STRONG&gt; function to subtract 3 days from the &lt;STRONG&gt;CurrentDate().&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;If it is false, i.e. the current date is not a Monday, we need to perform a further check. This requires a second IF statement to perform this second check.&lt;/P&gt;&lt;P&gt;The second check asks if the &lt;STRONG&gt;CurrentDate()&lt;/STRONG&gt; is a Sunday.&lt;/P&gt;&lt;P&gt;If it is true that it is a Sunday, we want to use the &lt;STRONG&gt;RelativeDate&lt;/STRONG&gt; function to subtract 2 days from the &lt;STRONG&gt;CurrentDate().&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;If it is false, i.e. the current date is not a Sunday, and we know its not a Monday as we checked for that previously, then we know that the day is a Tuesday, Wednesday, Thursday, Friday or Saturday and hence we can safely use &lt;STRONG&gt;RelativeDate&lt;/STRONG&gt; with a value of -1 to give us the previous working day.&lt;/P&gt;&lt;P&gt;&lt;A href="https://bobjblog.files.wordpress.com/2012/02/2-currentdayname.png"&gt;&lt;IMG alt="" class="size-full wp-image-361 aligncenter jiveImage" src="https://bobjblog.files.wordpress.com/2012/02/2-currentdayname.png?w=780" title="2 CurrentDayName" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Sep 2014 07:54:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/do-we-have-RelativeDate-function-in-QV/m-p/724091#M670987</guid>
      <dc:creator />
      <dc:date>2014-09-30T07:54:10Z</dc:date>
    </item>
    <item>
      <title>Re: do we have RelativeDate function in QV?</title>
      <link>https://community.qlik.com/t5/QlikView/do-we-have-RelativeDate-function-in-QV/m-p/724092#M670988</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;You can use&lt;/P&gt;&lt;P&gt;if you want add Days : Date(num(day+3))&lt;/P&gt;&lt;P&gt;if you want to add Months : AddMonths(Datefield,2)&lt;/P&gt;&lt;P&gt;If you want to add Years : AddYears(Datefield,2)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For details go to Help Menu.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Sep 2014 08:10:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/do-we-have-RelativeDate-function-in-QV/m-p/724092#M670988</guid>
      <dc:creator>PrashantSangle</dc:creator>
      <dc:date>2014-09-30T08:10:02Z</dc:date>
    </item>
  </channel>
</rss>

