<?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 Function Left doesn´t read correctly the date. in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Function-Left-doesn-t-read-correctly-the-date/m-p/1169358#M903778</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Im trying to extract the year and month, with functions left and mid, but when I extract the year from '2016-05-01', read 2014 instead of 2016.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="debito.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/130023_debito.png" style="height: auto; float: none;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="debito.png" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/130024_debito.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
    <dc:creator />
    <dc:date>2020-11-25T16:16:04Z</dc:date>
    <item>
      <title>Function Left doesn´t read correctly the date.</title>
      <link>https://community.qlik.com/t5/QlikView/Function-Left-doesn-t-read-correctly-the-date/m-p/1169358#M903778</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Im trying to extract the year and month, with functions left and mid, but when I extract the year from '2016-05-01', read 2014 instead of 2016.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="debito.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/130023_debito.png" style="height: auto; float: none;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="debito.png" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/130024_debito.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Function-Left-doesn-t-read-correctly-the-date/m-p/1169358#M903778</guid>
      <dc:creator />
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Function Left doesn´t read correctly the date.</title>
      <link>https://community.qlik.com/t5/QlikView/Function-Left-doesn-t-read-correctly-the-date/m-p/1169359#M903779</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Fernando,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let Year= Left('$(vInicioPrincipalidad)',4);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Jul 2016 16:43:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Function-Left-doesn-t-read-correctly-the-date/m-p/1169359#M903779</guid>
      <dc:creator>tamilarasu</dc:creator>
      <dc:date>2016-07-04T16:43:30Z</dc:date>
    </item>
    <item>
      <title>Re: Function Left doesn´t read correctly the date.</title>
      <link>https://community.qlik.com/t5/QlikView/Function-Left-doesn-t-read-correctly-the-date/m-p/1169360#M903780</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;It's absolutely normal.&lt;/P&gt;&lt;P&gt;Using $(vInicioPrincipalidad) you ask to qlikview an evaluation of the variable &lt;SPAN style="font-size: 13.3333px;"&gt;vInicioPrincipalidad so it will operate:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;2016 - 1 - 1 = 2014 (read - as substraction operator)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;You should force use your variable as a text string to do that use single quotes:&lt;/P&gt;&lt;P&gt;let year = left('$(&lt;SPAN style="font-size: 13.3333px;"&gt;vInicioPrincipalidad&lt;/SPAN&gt;)',4);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or in this case you can use the function year to extract year from a date:&lt;/P&gt;&lt;P&gt;let year = year(&lt;SPAN style="font-size: 13.3333px;"&gt;vInicioPrincipalidad&lt;/SPAN&gt;);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it will help.&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Jul 2016 16:47:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Function-Left-doesn-t-read-correctly-the-date/m-p/1169360#M903780</guid>
      <dc:creator>remi_roland</dc:creator>
      <dc:date>2016-07-04T16:47:16Z</dc:date>
    </item>
    <item>
      <title>Re: Function Left doesn´t read correctly the date.</title>
      <link>https://community.qlik.com/t5/QlikView/Function-Left-doesn-t-read-correctly-the-date/m-p/1169361#M903781</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try&lt;/P&gt;&lt;P&gt;Let Year = Left(vInicioPrincipalidad,4);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Jul 2016 16:56:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Function-Left-doesn-t-read-correctly-the-date/m-p/1169361#M903781</guid>
      <dc:creator>antoniotiman</dc:creator>
      <dc:date>2016-07-04T16:56:00Z</dc:date>
    </item>
    <item>
      <title>Re: Function Left doesn´t read correctly the date.</title>
      <link>https://community.qlik.com/t5/QlikView/Function-Left-doesn-t-read-correctly-the-date/m-p/1169362#M903782</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Remi, it was really useful!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Jul 2016 20:10:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Function-Left-doesn-t-read-correctly-the-date/m-p/1169362#M903782</guid>
      <dc:creator />
      <dc:date>2016-07-04T20:10:42Z</dc:date>
    </item>
  </channel>
</rss>

