<?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: Expression Builder - Test Variable Value issues in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Expression-Builder-Test-Variable-Value-issues/m-p/2198199#M1632</link>
    <description>hi, 
&lt;BR /&gt;made a little mistake as if you read '06232012' as an integer ... you'll lost '0' =&amp;gt; '6232012' .. 
&lt;BR /&gt;So take it like an String to keep all characters. 
&lt;BR /&gt;and to be honest i never use Test button in tmap but debug (&amp;amp;test) values with the debug run (in Tis you are be able to see the values using in tmap in &amp;amp; out 
&lt;BR /&gt;using substring to rewrite your date, how can be sure your date will always be MMddyyyy format. 
&lt;BR /&gt;To conform your data you'll have to check MM, dd and yyyy are valide before format in another way or you'll never be sure that those values are coherent (some data quality)! 
&lt;BR /&gt;Never trust sources 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MACn.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154443iC5B8CACEF3D12C6A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MACn.png" alt="0683p000009MACn.png" /&gt;&lt;/span&gt; 
&lt;BR /&gt;For your purpose i'll parse date, check date and format date with Talend method &amp;amp; component ! 
&lt;BR /&gt;regards 
&lt;BR /&gt;laurent</description>
    <pubDate>Tue, 31 Jul 2012 07:55:49 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2012-07-31T07:55:49Z</dc:date>
    <item>
      <title>Expression Builder - Test Variable Value issues</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Expression-Builder-Test-Variable-Value-issues/m-p/2198196#M1629</link>
      <description>In a tMap I have data coming in as a Integer(32) that is being mapped to a MySQL database as an Integer Int(32) of about the same size. An Int is supposedly 2,147,483,647 to -2,147,483,647 or something like that. 
&lt;BR /&gt;Use Expression: 
&lt;BR /&gt; 
&lt;PRE&gt;row1.Column1&lt;/PRE&gt; 
&lt;BR /&gt;Go to Test variable section, set 
&lt;BR /&gt; 
&lt;PRE&gt;row1.Column1 = 06232012&lt;/PRE&gt; 
&lt;BR /&gt; 
&lt;I&gt;* No quotes etc.&lt;/I&gt; 
&lt;BR /&gt;Click the button 'Test' and you get the result: 
&lt;BR /&gt; 
&lt;PRE&gt;1651722&lt;/PRE&gt; 
&lt;BR /&gt;I basically just want to change this date number into a new format but the test window in the expression editor appears to be buggy. It is in a excel MMddyyyy format and i need a yyyyMMdd int format. I first thought it would be a simple import as String format and then use: 
&lt;BR /&gt; 
&lt;PRE&gt;row1.BILL_DATE.length() != 8 ? "" : Integer.parseInt((&lt;BR /&gt;row1.BILL_DATE.substring(4, 4) +&lt;BR /&gt;row1.BILL_DATE.substring(0, 2) +&lt;BR /&gt;row1.BILL_DATE.substring(2, 2)&lt;BR /&gt;))&lt;/PRE&gt; 
&lt;BR /&gt;.. but it keeps failing. I have tried several iterations of this as a number / string / etc.. to no avail. Please let me know if I am doing something Wrong here -- I am not sure if this is a bug or if I am testing wrong.</description>
      <pubDate>Sat, 16 Nov 2024 12:13:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Expression-Builder-Test-Variable-Value-issues/m-p/2198196#M1629</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T12:13:44Z</dc:date>
    </item>
    <item>
      <title>Re: Expression Builder - Test Variable Value issues</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Expression-Builder-Test-Variable-Value-issues/m-p/2198197#M1630</link>
      <description>hi,&lt;BR /&gt;first read integer as a String :&lt;BR /&gt;&lt;PRE&gt;(String.valueOf(06232012))&lt;/PRE&gt;&lt;BR /&gt;then analyse the format of the string as a date&lt;BR /&gt;&lt;PRE&gt;parseDate("MMddyyyy",(String.valueOf(06232012)))&lt;/PRE&gt;&lt;BR /&gt;and finally format the result in a new format :&lt;BR /&gt;&lt;PRE&gt;formatDate("yyyyMMdd",parseDate("MMddyyyy",(String.valueOf(06232012))))&lt;/PRE&gt;&lt;BR /&gt;that's it&lt;BR /&gt;hope it helps&lt;BR /&gt;regards&lt;BR /&gt;laurent</description>
      <pubDate>Sun, 29 Jul 2012 14:18:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Expression-Builder-Test-Variable-Value-issues/m-p/2198197#M1630</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-07-29T14:18:25Z</dc:date>
    </item>
    <item>
      <title>Re: Expression Builder - Test Variable Value issues</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Expression-Builder-Test-Variable-Value-issues/m-p/2198198#M1631</link>
      <description>So you are saying this is a bug in the expression builder trying to be too helpful which is akin to Excel automatically converting big numbers to scientific notation?</description>
      <pubDate>Mon, 30 Jul 2012 16:50:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Expression-Builder-Test-Variable-Value-issues/m-p/2198198#M1631</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-07-30T16:50:12Z</dc:date>
    </item>
    <item>
      <title>Re: Expression Builder - Test Variable Value issues</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Expression-Builder-Test-Variable-Value-issues/m-p/2198199#M1632</link>
      <description>hi, 
&lt;BR /&gt;made a little mistake as if you read '06232012' as an integer ... you'll lost '0' =&amp;gt; '6232012' .. 
&lt;BR /&gt;So take it like an String to keep all characters. 
&lt;BR /&gt;and to be honest i never use Test button in tmap but debug (&amp;amp;test) values with the debug run (in Tis you are be able to see the values using in tmap in &amp;amp; out 
&lt;BR /&gt;using substring to rewrite your date, how can be sure your date will always be MMddyyyy format. 
&lt;BR /&gt;To conform your data you'll have to check MM, dd and yyyy are valide before format in another way or you'll never be sure that those values are coherent (some data quality)! 
&lt;BR /&gt;Never trust sources 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MACn.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154443iC5B8CACEF3D12C6A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MACn.png" alt="0683p000009MACn.png" /&gt;&lt;/span&gt; 
&lt;BR /&gt;For your purpose i'll parse date, check date and format date with Talend method &amp;amp; component ! 
&lt;BR /&gt;regards 
&lt;BR /&gt;laurent</description>
      <pubDate>Tue, 31 Jul 2012 07:55:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Expression-Builder-Test-Variable-Value-issues/m-p/2198199#M1632</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-07-31T07:55:49Z</dc:date>
    </item>
  </channel>
</rss>

