<?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 [resolved] tSetGlobalVar to date in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/resolved-tSetGlobalVar-to-date/m-p/2250876#M35004</link>
    <description>Hello, 
&lt;BR /&gt;I have a problem that I really don't understand. 
&lt;BR /&gt;Here is my job: 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MD4X.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/142166i635E05175F815789/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MD4X.png" alt="0683p000009MD4X.png" /&gt;&lt;/span&gt;The first subjob works well. 
&lt;BR /&gt;tMap_1 is: 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MD69.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/137474i58BF46A25794F74D/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MD69.png" alt="0683p000009MD69.png" /&gt;&lt;/span&gt; 
&lt;BR /&gt;In the second subjob, there is a tmap (tmap_2): I have a problem with it. 
&lt;BR /&gt;I map my different fields between the fileinput and the database TEMP, and for one row, I map with a var from tSetGlobalVar_1. 
&lt;BR /&gt;Here is the important part of my tMap_2: 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MCzG.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/128999i35215EBE647D398E/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MCzG.png" alt="0683p000009MCzG.png" /&gt;&lt;/span&gt;myDate is from tSetGlobalVar. 
&lt;BR /&gt;When I run the job, I have this error: 
&lt;I&gt;Type mismatch, cannot convert from Object to Date.&lt;/I&gt; 
&lt;BR /&gt;If I replace by 
&lt;I&gt;&amp;nbsp;globalMap.get("myDate")&lt;/I&gt;, I have 
&lt;I&gt; Exception in component tMap_2&lt;/I&gt; 
&lt;BR /&gt; 
&lt;I&gt;java.lang.ClassCastException: java.lang.String cannot be cast to java.util.Date.&lt;/I&gt; 
&lt;BR /&gt; 
&lt;BR /&gt;Any ideas? 
&lt;BR /&gt;Thanks!</description>
    <pubDate>Tue, 09 Feb 2016 19:53:39 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2016-02-09T19:53:39Z</dc:date>
    <item>
      <title>[resolved] tSetGlobalVar to date</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-tSetGlobalVar-to-date/m-p/2250876#M35004</link>
      <description>Hello, 
&lt;BR /&gt;I have a problem that I really don't understand. 
&lt;BR /&gt;Here is my job: 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MD4X.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/142166i635E05175F815789/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MD4X.png" alt="0683p000009MD4X.png" /&gt;&lt;/span&gt;The first subjob works well. 
&lt;BR /&gt;tMap_1 is: 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MD69.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/137474i58BF46A25794F74D/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MD69.png" alt="0683p000009MD69.png" /&gt;&lt;/span&gt; 
&lt;BR /&gt;In the second subjob, there is a tmap (tmap_2): I have a problem with it. 
&lt;BR /&gt;I map my different fields between the fileinput and the database TEMP, and for one row, I map with a var from tSetGlobalVar_1. 
&lt;BR /&gt;Here is the important part of my tMap_2: 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MCzG.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/128999i35215EBE647D398E/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MCzG.png" alt="0683p000009MCzG.png" /&gt;&lt;/span&gt;myDate is from tSetGlobalVar. 
&lt;BR /&gt;When I run the job, I have this error: 
&lt;I&gt;Type mismatch, cannot convert from Object to Date.&lt;/I&gt; 
&lt;BR /&gt;If I replace by 
&lt;I&gt;&amp;nbsp;globalMap.get("myDate")&lt;/I&gt;, I have 
&lt;I&gt; Exception in component tMap_2&lt;/I&gt; 
&lt;BR /&gt; 
&lt;I&gt;java.lang.ClassCastException: java.lang.String cannot be cast to java.util.Date.&lt;/I&gt; 
&lt;BR /&gt; 
&lt;BR /&gt;Any ideas? 
&lt;BR /&gt;Thanks!</description>
      <pubDate>Tue, 09 Feb 2016 19:53:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-tSetGlobalVar-to-date/m-p/2250876#M35004</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-02-09T19:53:39Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] tSetGlobalVar to date</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-tSetGlobalVar-to-date/m-p/2250877#M35005</link>
      <description>What data type is your globalvariable set to? In your first tMap you are going from a Date type to a Date type. In the second the globalvariable is being pulled in as an object and when you replace it as a string. It should be the same as in normal java of converting/casting between data types.</description>
      <pubDate>Tue, 09 Feb 2016 20:19:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-tSetGlobalVar-to-date/m-p/2250877#M35005</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-02-09T20:19:52Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] tSetGlobalVar to date</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-tSetGlobalVar-to-date/m-p/2250878#M35006</link>
      <description>Hello,&lt;BR /&gt;Thanks for your answer!&lt;BR /&gt;What you said helped me to think and I finally solved my problem.&lt;BR /&gt;First, I had a mistake in my tSetGlobalVar: the value was incorrect.&lt;BR /&gt;Then, I "putted evertything in string": in my fisrt tmap, I set my date value as a string.&lt;BR /&gt;Finally, in my last tMap, in put&amp;nbsp;&lt;B&gt;globalMap.get("myDate").toString(), &lt;/B&gt;so as a string. My MySQL DB receive the date as a string but knows how to deal with it and put it finally as a date.&lt;BR /&gt;And it's ok!</description>
      <pubDate>Wed, 10 Feb 2016 12:38:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-tSetGlobalVar-to-date/m-p/2250878#M35006</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-02-10T12:38:51Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] tSetGlobalVar to date</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-tSetGlobalVar-to-date/m-p/2250879#M35007</link>
      <description>Glad it helped!&amp;nbsp; 
&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;</description>
      <pubDate>Wed, 10 Feb 2016 17:29:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-tSetGlobalVar-to-date/m-p/2250879#M35007</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-02-10T17:29:46Z</dc:date>
    </item>
  </channel>
</rss>

