<?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 using parseDate for string entry type in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/using-parseDate-for-string-entry-type/m-p/2367201#M130604</link>
    <description>&lt;P&gt;Hello,&lt;BR /&gt;I have a column (string) containing dates in the format yyyyMMdd or 0 when the date is not indicated. I am trying to convert the string to date using this expression&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt; 
&lt;PRE&gt;getData.name.equals("0") ? null:(TalendDate.parseDate("yyyyMMdd",getData.name))&amp;nbsp;&lt;/PRE&gt; 
&lt;P&gt;&lt;BR /&gt;but I have this error&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt; 
&lt;BLOCKQUOTE&gt;
 Exception in component tMSSqlOutput_1
 &lt;BR /&gt;java.sql.SQLException: Only dates in the AD era are accepted.
&lt;/BLOCKQUOTE&gt; 
&lt;P&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;FONT face="Verdana,"&gt;When I tried with tlogrow to see if the conversion worked &amp;nbsp;after t_map, I have found that:&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;FONT face="Verdana,"&gt;if I have &amp;nbsp;20060330 it returns 30-03-2006 ,but if it's 0 it returns 30-11-0002 , so it is not taking in account the first condition in my statement.&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;FONT face="Verdana,"&gt;Do you have any Idea how to correct this?&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;FONT face="Verdana,"&gt;Thank you&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 03 May 2016 16:06:47 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2016-05-03T16:06:47Z</dc:date>
    <item>
      <title>using parseDate for string entry type</title>
      <link>https://community.qlik.com/t5/Talend-Studio/using-parseDate-for-string-entry-type/m-p/2367201#M130604</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;I have a column (string) containing dates in the format yyyyMMdd or 0 when the date is not indicated. I am trying to convert the string to date using this expression&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt; 
&lt;PRE&gt;getData.name.equals("0") ? null:(TalendDate.parseDate("yyyyMMdd",getData.name))&amp;nbsp;&lt;/PRE&gt; 
&lt;P&gt;&lt;BR /&gt;but I have this error&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt; 
&lt;BLOCKQUOTE&gt;
 Exception in component tMSSqlOutput_1
 &lt;BR /&gt;java.sql.SQLException: Only dates in the AD era are accepted.
&lt;/BLOCKQUOTE&gt; 
&lt;P&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;FONT face="Verdana,"&gt;When I tried with tlogrow to see if the conversion worked &amp;nbsp;after t_map, I have found that:&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;FONT face="Verdana,"&gt;if I have &amp;nbsp;20060330 it returns 30-03-2006 ,but if it's 0 it returns 30-11-0002 , so it is not taking in account the first condition in my statement.&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;FONT face="Verdana,"&gt;Do you have any Idea how to correct this?&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;FONT face="Verdana,"&gt;Thank you&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 03 May 2016 16:06:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/using-parseDate-for-string-entry-type/m-p/2367201#M130604</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-05-03T16:06:47Z</dc:date>
    </item>
    <item>
      <title>Re: using parseDate for string entry type</title>
      <link>https://community.qlik.com/t5/Talend-Studio/using-parseDate-for-string-entry-type/m-p/2367202#M130605</link>
      <description>I do not think that it is a value of "0" that is yielding 30-11-0002 as it ought to throw an exception before hitting an SQL exception.&lt;BR /&gt;I also cannot see anything wrong with your "0" test, if that is what you're value is.</description>
      <pubDate>Tue, 03 May 2016 16:20:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/using-parseDate-for-string-entry-type/m-p/2367202#M130605</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-05-03T16:20:28Z</dc:date>
    </item>
    <item>
      <title>Re: using parseDate for string entry type</title>
      <link>https://community.qlik.com/t5/Talend-Studio/using-parseDate-for-string-entry-type/m-p/2367203#M130606</link>
      <description>Howerver it seems the case. Here is an example of a line from my source file and the output from the tlogrow component&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://community.talend.com/legacyfs/online/374200/example.zip.zip" target="_blank"&gt;example.zip.zip&lt;/A&gt;</description>
      <pubDate>Wed, 04 May 2016 09:03:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/using-parseDate-for-string-entry-type/m-p/2367203#M130606</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-05-04T09:03:48Z</dc:date>
    </item>
    <item>
      <title>Re: using parseDate for string entry type</title>
      <link>https://community.qlik.com/t5/Talend-Studio/using-parseDate-for-string-entry-type/m-p/2367204#M130607</link>
      <description>I don't think you're providing enough information.&lt;BR /&gt;Your tLogRow output is showing both String and Date Format values, so it can't be of Date type.&lt;BR /&gt;Your data is coming from Excel. Maybe something is going wrong before tMap. Try dropping in an additional tLogRow to see?&lt;BR /&gt;A screenshot of your tMap may also help.</description>
      <pubDate>Wed, 04 May 2016 09:30:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/using-parseDate-for-string-entry-type/m-p/2367204#M130607</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-05-04T09:30:24Z</dc:date>
    </item>
    <item>
      <title>Re: using parseDate for string entry type</title>
      <link>https://community.qlik.com/t5/Talend-Studio/using-parseDate-for-string-entry-type/m-p/2367205#M130608</link>
      <description>Exactly! putting tlogrow before tmap showed me the error! 
&lt;BR /&gt;The "0" in my excel file is shown as "00000000" in the tlogrow 
&lt;BR /&gt;Now my expression is right and it's working 
&lt;BR /&gt; 
&lt;PRE&gt;row2.name("00000000") ? null:(TalendDate.parseDate("yyyyMMdd",row2.name))&amp;nbsp;&lt;/PRE&gt; 
&lt;BR /&gt;Thanks a lot for your help!</description>
      <pubDate>Wed, 04 May 2016 11:31:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/using-parseDate-for-string-entry-type/m-p/2367205#M130608</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-05-04T11:31:26Z</dc:date>
    </item>
  </channel>
</rss>

