<?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 parse int to date (tmap ) Talend postgresql in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/parse-int-to-date-tmap-Talend-postgresql/m-p/2336341#M104797</link>
    <description>&lt;P&gt;&lt;SPAN&gt;Hey all , My job Talend is about mapping between a csv file and a postregresql table. I need to insert a column date wich can be with normale format yyyyMMdd or(0/99999999) in the csv file.So if the date is equal to 0 or 99999999 it's will be mapping as a null variable in the database ,else the data must be loaded as a date type timestamp yyyy-mm-dd HH:mm:ss. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In the csv file i declared the date as an int , so i must parse int to a datetime in the tmap and loaded the 0/99999999 as a null variable . Any help please .&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 05:44:10 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-11-16T05:44:10Z</dc:date>
    <item>
      <title>parse int to date (tmap ) Talend postgresql</title>
      <link>https://community.qlik.com/t5/Talend-Studio/parse-int-to-date-tmap-Talend-postgresql/m-p/2336341#M104797</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hey all , My job Talend is about mapping between a csv file and a postregresql table. I need to insert a column date wich can be with normale format yyyyMMdd or(0/99999999) in the csv file.So if the date is equal to 0 or 99999999 it's will be mapping as a null variable in the database ,else the data must be loaded as a date type timestamp yyyy-mm-dd HH:mm:ss. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In the csv file i declared the date as an int , so i must parse int to a datetime in the tmap and loaded the 0/99999999 as a null variable . Any help please .&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 05:44:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/parse-int-to-date-tmap-Talend-postgresql/m-p/2336341#M104797</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T05:44:10Z</dc:date>
    </item>
    <item>
      <title>Re: parse int to date (tmap ) Talend postgresql</title>
      <link>https://community.qlik.com/t5/Talend-Studio/parse-int-to-date-tmap-Talend-postgresql/m-p/2336342#M104798</link>
      <description>&lt;P&gt;&lt;SPAN class="tlid-translation translation"&gt;&lt;SPAN class=""&gt;you can use&lt;/SPAN&gt;&lt;/SPAN&gt; tMap and Var (for ex. Var.datetime)&lt;/P&gt;&lt;PRE&gt;(rowX.i == 0 || rowX.i == 99999999 ) ? null: TalendDate.parseDate("yyyyMMdd", Integer.toString(i))&lt;/PRE&gt;&lt;P&gt;rowX is a input row,&lt;BR /&gt;Var.datetime must be inserted to output row.&lt;/P&gt;</description>
      <pubDate>Mon, 27 May 2019 14:27:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/parse-int-to-date-tmap-Talend-postgresql/m-p/2336342#M104798</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-05-27T14:27:10Z</dc:date>
    </item>
    <item>
      <title>Re: parse int to date (tmap ) Talend postgresql</title>
      <link>https://community.qlik.com/t5/Talend-Studio/parse-int-to-date-tmap-Talend-postgresql/m-p/2336343#M104799</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/0053p000007LORiAAO"&gt;@sm&lt;/A&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Please refer the below flow for the solution.&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="image.png" style="width: 694px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M562.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/153915iDFB0927FBF3B2664/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M562.png" alt="0683p000009M562.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="image.png" style="width: 607px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M5A3.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/128002i89D2215E67C82A4F/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M5A3.png" alt="0683p000009M5A3.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="image.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M5AD.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/144531iEBD8BA8CAD435C70/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M5AD.png" alt="0683p000009M5AD.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Please note that while reading the csv, select String as the data type for input data (even if the data is integer). The function to be used is as below.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;Relational.ISNULL(row1.input)|| row1.input.equalsIgnoreCase("99999999") || row1.input.equalsIgnoreCase("0")? null:TalendDate.parseDate("yyyymmdd",row1.input) &lt;/PRE&gt; 
&lt;P&gt;Since your input value do not have time part, it will be automatically added as default values while checking from DB.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Hope I have answered your query. Please spare a second to mark the topic as resolved &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Warm Regards,&lt;BR /&gt;Nikhil Thampi&lt;/P&gt; 
&lt;P&gt;Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 May 2019 14:59:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/parse-int-to-date-tmap-Talend-postgresql/m-p/2336343#M104799</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-05-27T14:59:39Z</dc:date>
    </item>
    <item>
      <title>Re: parse int to date (tmap ) Talend postgresql</title>
      <link>https://community.qlik.com/t5/Talend-Studio/parse-int-to-date-tmap-Talend-postgresql/m-p/2336344#M104800</link>
      <description>&lt;P&gt;Thank you &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;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 May 2019 10:12:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/parse-int-to-date-tmap-Talend-postgresql/m-p/2336344#M104800</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-05-28T10:12:19Z</dc:date>
    </item>
  </channel>
</rss>

