<?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: Trimming a value within a formula in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Trimming-a-value-within-a-formula/m-p/1043170#M350938</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;QlikView has an age function.&lt;/P&gt;&lt;P&gt;You will need to load your QT_EFFECTIVE_DATE as a date field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AGE(Date#(QT_EFFECTIVE_DATE, 'YYYYMMDD'), makedate(HO_CONSTRUCTION_YEAR))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 09 Mar 2016 21:46:13 GMT</pubDate>
    <dc:creator>Colin-Albert</dc:creator>
    <dc:date>2016-03-09T21:46:13Z</dc:date>
    <item>
      <title>Trimming a value within a formula</title>
      <link>https://community.qlik.com/t5/QlikView/Trimming-a-value-within-a-formula/m-p/1043168#M350936</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the load script, I am trying to subtract&lt;/P&gt;&lt;P&gt;[QT_EFFECTIVE_DATE] - [HO_CONSTRUCTION_YEAR] AS AGE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the data types are a bit different. For &lt;SPAN style="font-size: 13.3333px;"&gt;[QT_EFFECTIVE_DATE], the data looks like 20150124 and &lt;SPAN style="font-size: 13.3333px;"&gt;[HO_CONSTRUCTION_YEAR] is just the 4 digit year, like 2008.&amp;nbsp; So I need to trim the right 4 digits of &lt;SPAN style="font-size: 13.3333px;"&gt;[QT_EFFECTIVE_DATE] to just extract the year so the math will work. What would the syntax look like?&amp;nbsp; I tried the above but got an "invalid expression" error.&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Will trimming it work? Or will I need to also convert the data types as well? If so, what does that syntax look like?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Mar 2016 21:10:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trimming-a-value-within-a-formula/m-p/1043168#M350936</guid>
      <dc:creator />
      <dc:date>2016-03-09T21:10:12Z</dc:date>
    </item>
    <item>
      <title>Re: Trimming a value within a formula</title>
      <link>https://community.qlik.com/t5/QlikView/Trimming-a-value-within-a-formula/m-p/1043169#M350937</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #575757; font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;May be this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 10pt; color: #575757;"&gt;&lt;STRONG&gt;Num#(Left(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 10pt; color: #575757;"&gt;&lt;STRONG&gt;[QT_EFFECTIVE_DATE], 4), '##') - &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG style=": ; color: #575757; font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;[HO_CONSTRUCTION_YEAR] AS AGE&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Mar 2016 21:36:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trimming-a-value-within-a-formula/m-p/1043169#M350937</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-03-09T21:36:30Z</dc:date>
    </item>
    <item>
      <title>Re: Trimming a value within a formula</title>
      <link>https://community.qlik.com/t5/QlikView/Trimming-a-value-within-a-formula/m-p/1043170#M350938</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;QlikView has an age function.&lt;/P&gt;&lt;P&gt;You will need to load your QT_EFFECTIVE_DATE as a date field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AGE(Date#(QT_EFFECTIVE_DATE, 'YYYYMMDD'), makedate(HO_CONSTRUCTION_YEAR))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Mar 2016 21:46:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trimming-a-value-within-a-formula/m-p/1043170#M350938</guid>
      <dc:creator>Colin-Albert</dc:creator>
      <dc:date>2016-03-09T21:46:13Z</dc:date>
    </item>
  </channel>
</rss>

