<?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: Condition : If 0 then NULL else convert date to YYYYMMDD. How to make this in talend. in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Condition-If-0-then-NULL-else-convert-date-to-YYYYMMDD-How-to/m-p/2352182#M118611</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As your source can have value 0 I guess it is string value so try this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;row1.newColumn.equals("0")?null:TalendDate.parseDate("yyyyMMdd",row1.newColumn)&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also you have to change ports date format to yyyyMMdd from default "dd-MM-yyyy"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.&lt;/P&gt;</description>
    <pubDate>Fri, 22 Sep 2017 09:25:15 GMT</pubDate>
    <dc:creator>shivanand</dc:creator>
    <dc:date>2017-09-22T09:25:15Z</dc:date>
    <item>
      <title>Condition : If 0 then NULL else convert date to YYYYMMDD. How to make this in talend.</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Condition-If-0-then-NULL-else-convert-date-to-YYYYMMDD-How-to/m-p/2352181#M118610</link>
      <description>&lt;P&gt;Condition : If 0 then NULL else convert date to YYYYMMDD. How to make this in talend.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Sep 2017 08:37:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Condition-If-0-then-NULL-else-convert-date-to-YYYYMMDD-How-to/m-p/2352181#M118610</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-09-22T08:37:34Z</dc:date>
    </item>
    <item>
      <title>Re: Condition : If 0 then NULL else convert date to YYYYMMDD. How to make this in talend.</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Condition-If-0-then-NULL-else-convert-date-to-YYYYMMDD-How-to/m-p/2352182#M118611</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As your source can have value 0 I guess it is string value so try this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;row1.newColumn.equals("0")?null:TalendDate.parseDate("yyyyMMdd",row1.newColumn)&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also you have to change ports date format to yyyyMMdd from default "dd-MM-yyyy"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Sep 2017 09:25:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Condition-If-0-then-NULL-else-convert-date-to-YYYYMMDD-How-to/m-p/2352182#M118611</guid>
      <dc:creator>shivanand</dc:creator>
      <dc:date>2017-09-22T09:25:15Z</dc:date>
    </item>
    <item>
      <title>Re: Condition : If 0 then NULL else convert date to YYYYMMDD. How to make this in talend.</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Condition-If-0-then-NULL-else-convert-date-to-YYYYMMDD-How-to/m-p/2352183#M118612</link>
      <description>&lt;P&gt;You really need to give an example of your data. I will assume that you want to convert a number to a date, rather than a String. I will also assume all months and days will be made up of 2 digits. If this is correct, you can do it as below....&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;row.value==0 ? null : routines.TalendDate.parseDate("yyyyMMdd", (row.value+""))&lt;/PRE&gt; 
&lt;P&gt;The above will convert a number to a Date object based on assuming that the number represents a date in the format yyyyMMdd. The above would be prone to errors if the number wasn't precise.&lt;BR /&gt;&lt;BR /&gt;Alternatively, you may want to convert a millisecond value into a String representation of a date in the format yyyyMMdd. This might be done as below.....&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;row.value==0L ? null : routines.TalendDate.formatDate("yyyyMMdd", new Date(row.value))&lt;/PRE&gt; 
&lt;P&gt;0L is used to indicate a Long....since if this is what is required your number would have to be Long.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;There are many ways to achieve a suitable answer to your question, but to get the answer you want you might want to give more detail.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Sep 2017 09:38:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Condition-If-0-then-NULL-else-convert-date-to-YYYYMMDD-How-to/m-p/2352183#M118612</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-09-22T09:38:37Z</dc:date>
    </item>
  </channel>
</rss>

