<?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 string to Date conversion issue in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/string-to-Date-conversion-issue/m-p/2231590#M21844</link>
    <description>&lt;P&gt;Hello Talendians,&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I am trying to convert a string&amp;nbsp; type to date type for a column. The source date is 2018-12-04 for example. The target date type is&amp;nbsp;&lt;SPAN&gt;"EEE MMM dd hh:mm:ss:zzz yyyy".&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;I tried using the following function in my tmap.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;row4.&lt;/SPAN&gt;&lt;I&gt;account_product_termination_date&lt;/I&gt;&lt;SPAN&gt;!=null &amp;amp;&amp;amp; row4.&lt;/SPAN&gt;&lt;I&gt;account_product_termination_date&lt;/I&gt;&lt;SPAN&gt;!=" " ? TalendDate.parseDate("EEE MMM dd hh:mm:ss:zzz yyyy",row4.&lt;/SPAN&gt;&lt;I&gt;account_product_termination_date&lt;/I&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;I see error&lt;IMG id="smileyvery-happy" class="emoticon emoticon-smileyvery-happy" src="https://community.qlik.com/" alt="Smiley Very Happy" title="Smiley Very Happy" /&gt;etail Message: Syntax error, insert ": Expression" to complete Expression&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;Can someone explain me what i am doing wrong?&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 02:33:43 GMT</pubDate>
    <dc:creator>desanip</dc:creator>
    <dc:date>2024-11-16T02:33:43Z</dc:date>
    <item>
      <title>string to Date conversion issue</title>
      <link>https://community.qlik.com/t5/Talend-Studio/string-to-Date-conversion-issue/m-p/2231590#M21844</link>
      <description>&lt;P&gt;Hello Talendians,&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I am trying to convert a string&amp;nbsp; type to date type for a column. The source date is 2018-12-04 for example. The target date type is&amp;nbsp;&lt;SPAN&gt;"EEE MMM dd hh:mm:ss:zzz yyyy".&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;I tried using the following function in my tmap.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;row4.&lt;/SPAN&gt;&lt;I&gt;account_product_termination_date&lt;/I&gt;&lt;SPAN&gt;!=null &amp;amp;&amp;amp; row4.&lt;/SPAN&gt;&lt;I&gt;account_product_termination_date&lt;/I&gt;&lt;SPAN&gt;!=" " ? TalendDate.parseDate("EEE MMM dd hh:mm:ss:zzz yyyy",row4.&lt;/SPAN&gt;&lt;I&gt;account_product_termination_date&lt;/I&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;I see error&lt;IMG id="smileyvery-happy" class="emoticon emoticon-smileyvery-happy" src="https://community.qlik.com/" alt="Smiley Very Happy" title="Smiley Very Happy" /&gt;etail Message: Syntax error, insert ": Expression" to complete Expression&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;Can someone explain me what i am doing wrong?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 02:33:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/string-to-Date-conversion-issue/m-p/2231590#M21844</guid>
      <dc:creator>desanip</dc:creator>
      <dc:date>2024-11-16T02:33:43Z</dc:date>
    </item>
    <item>
      <title>Re: string to Date conversion issue</title>
      <link>https://community.qlik.com/t5/Talend-Studio/string-to-Date-conversion-issue/m-p/2231591#M21845</link>
      <description>&lt;P&gt;Two things,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;First, to compare strings in java use:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;!row4.&lt;/SPAN&gt;&lt;I&gt;account_product_termination_date.equals(&lt;/I&gt;&lt;SPAN&gt;" ")&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;instead of !=&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Also you need a true and false side to your statement, separated by a colon.&amp;nbsp; So what to you want to happen if the&amp;nbsp;row4.&lt;I&gt;account_product_termination_date is null?&amp;nbsp; Return null?&lt;/I&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;row4.&lt;I&gt;account_product_termination_date&lt;/I&gt;!=null &amp;amp;&amp;amp; !row4.&lt;I&gt;account_product_termination_date.equals(&lt;/I&gt;" ")&amp;nbsp;&amp;nbsp;? TalendDate.parseDate("EEE MMM dd hh:mm:ss:zzz yyyy",row4.&lt;I&gt;account_product_termination_date&lt;/I&gt;) : null&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Apr 2020 22:01:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/string-to-Date-conversion-issue/m-p/2231591#M21845</guid>
      <dc:creator>billimmer</dc:creator>
      <dc:date>2020-04-28T22:01:03Z</dc:date>
    </item>
    <item>
      <title>Re: string to Date conversion issue</title>
      <link>https://community.qlik.com/t5/Talend-Studio/string-to-Date-conversion-issue/m-p/2231592#M21846</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/0053p000007LMcNAAW"&gt;@billy&lt;/A&gt;&amp;nbsp;Thanks for the explanation and the expression works too. Cheers&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Thank you Sir.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Apr 2020 23:48:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/string-to-Date-conversion-issue/m-p/2231592#M21846</guid>
      <dc:creator>desanip</dc:creator>
      <dc:date>2020-04-28T23:48:27Z</dc:date>
    </item>
  </channel>
</rss>

