<?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: date(+*value*)   Conditional in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/date-value-Conditional/m-p/859170#M657525</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;perhaps you can try to condition the loading of these fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As for example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOAD&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;If(ISNULL(orderDate),'',Date(orderDate + 26298)) As OrderDate,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;If(ISNULL(del_date),'',Date(del_date + 26298)) As DelDate);&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOAD&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;orderdate, &lt;SPAN style="line-height: 1.5em;"&gt;del_date;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 30 Apr 2015 15:05:29 GMT</pubDate>
    <dc:creator>alex_millan</dc:creator>
    <dc:date>2015-04-30T15:05:29Z</dc:date>
    <item>
      <title>date(+*value*)   Conditional</title>
      <link>https://community.qlik.com/t5/QlikView/date-value-Conditional/m-p/859168#M657523</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;Ive got a relative simple question regarding changing the date in a script.&lt;/P&gt;&lt;P&gt;Ive got the following LOAD statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt; date(orderdate+26298) AS OrderDate,&lt;/P&gt;&lt;P&gt; date(del_date+26298) AS DelDate;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want this statement to be conditional. In words, orderdate+26298&amp;nbsp; IF there is a value in the date field. If not then don't add this number and let it empty.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my problem it adds a value to the date even if the field is empty, so I get a date out of nothing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Apr 2015 14:50:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/date-value-Conditional/m-p/859168#M657523</guid>
      <dc:creator />
      <dc:date>2015-04-30T14:50:24Z</dc:date>
    </item>
    <item>
      <title>Re: date(+*value*)   Conditional</title>
      <link>https://community.qlik.com/t5/QlikView/date-value-Conditional/m-p/859169#M657524</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If(len(orderdate)&amp;gt;0,&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;date(orderdate+26298)&lt;/SPAN&gt;) as OrderDate&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Apr 2015 15:03:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/date-value-Conditional/m-p/859169#M657524</guid>
      <dc:creator />
      <dc:date>2015-04-30T15:03:53Z</dc:date>
    </item>
    <item>
      <title>Re: date(+*value*)   Conditional</title>
      <link>https://community.qlik.com/t5/QlikView/date-value-Conditional/m-p/859170#M657525</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;perhaps you can try to condition the loading of these fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As for example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOAD&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;If(ISNULL(orderDate),'',Date(orderDate + 26298)) As OrderDate,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;If(ISNULL(del_date),'',Date(del_date + 26298)) As DelDate);&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOAD&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;orderdate, &lt;SPAN style="line-height: 1.5em;"&gt;del_date;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Apr 2015 15:05:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/date-value-Conditional/m-p/859170#M657525</guid>
      <dc:creator>alex_millan</dc:creator>
      <dc:date>2015-04-30T15:05:29Z</dc:date>
    </item>
    <item>
      <title>Re: date(+*value*)   Conditional</title>
      <link>https://community.qlik.com/t5/QlikView/date-value-Conditional/m-p/859171#M657526</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for helping. I tried your solutions. However somehow I was wrong initially. Qlikview interpretates my empty database value as the date: '30-12-99' &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So this changes things a bit, I would like: if 30-12-99 then set it to empty.&lt;/P&gt;&lt;P&gt;Suggestions?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Apr 2015 15:30:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/date-value-Conditional/m-p/859171#M657526</guid>
      <dc:creator />
      <dc:date>2015-04-30T15:30:23Z</dc:date>
    </item>
    <item>
      <title>Re: date(+*value*)   Conditional</title>
      <link>https://community.qlik.com/t5/QlikView/date-value-Conditional/m-p/859172#M657527</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;try this:&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOAD&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;if(order date&amp;lt;&amp;gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;'30-12-99'&lt;/SPAN&gt;,date(orderdate+26298),'') AS OrderDate,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;date(del_date+26298) AS DelDate;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Apr 2015 15:33:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/date-value-Conditional/m-p/859172#M657527</guid>
      <dc:creator />
      <dc:date>2015-04-30T15:33:39Z</dc:date>
    </item>
    <item>
      <title>Re: date(+*value*)   Conditional</title>
      <link>https://community.qlik.com/t5/QlikView/date-value-Conditional/m-p/859173#M657528</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If the value is in the format you wrote, try to just modify the conditional:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOAD&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;If(text(orderDate)='30-12-99','',Date(orderDate + 26298)) As OrderDate,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;If(text(del_date)&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;='30-12-99'&lt;/SPAN&gt;,'',Date(del_date + 26298)) As DelDate);&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOAD&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;orderdate, &lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;del_date;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;But check what is the original format of the data for these fields, just in case you must format them before the conditional.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Apr 2015 15:34:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/date-value-Conditional/m-p/859173#M657528</guid>
      <dc:creator>alex_millan</dc:creator>
      <dc:date>2015-04-30T15:34:21Z</dc:date>
    </item>
    <item>
      <title>Re: date(+*value*)   Conditional</title>
      <link>https://community.qlik.com/t5/QlikView/date-value-Conditional/m-p/859174#M657529</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you are right about the formating. Now this is what Ive got, the raw input for the orderdate fields are numbers like, '234234'&amp;nbsp; or an empty field is shown as 0 in the qlikview table viewer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I connect a master calendar to the dates it will automatically modify the this to dates like, '26-04-2010' or 0 is given as 31-12-71.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I have to do something with formatting?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EDIT:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks! I fiddled arround a bit with your suggestions. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; if(orderdate&amp;lt;&amp;gt;'0',date(orderdate+26298),'') AS OrderDate,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This seemed to work now. It was indeed a matter of finding the actual format. Thanks for the tip!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Apr 2015 15:49:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/date-value-Conditional/m-p/859174#M657529</guid>
      <dc:creator />
      <dc:date>2015-04-30T15:49:50Z</dc:date>
    </item>
  </channel>
</rss>

