<?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: Talend reformating database date fields in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Talend-reformating-database-date-fields/m-p/2322641#M92565</link>
    <description>Hello
&lt;BR /&gt;
&lt;BLOCKQUOTE&gt;
 &lt;TABLE border="1"&gt;
  &lt;TBODY&gt;
   &lt;TR&gt;
    &lt;TD&gt;Why would Talend auto mapping change the formatting of date fields?&lt;/TD&gt;
   &lt;/TR&gt;
  &lt;/TBODY&gt;
 &lt;/TABLE&gt;
&lt;/BLOCKQUOTE&gt;
&lt;BR /&gt;The input type is a Date, so Talend print it with the locale default format. If you want to see it in one pattern, you need format it as you do above.
&lt;BR /&gt;Best regards
&lt;BR /&gt; shong</description>
    <pubDate>Wed, 16 Sep 2009 02:40:26 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2009-09-16T02:40:26Z</dc:date>
    <item>
      <title>Talend reformating database date fields</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Talend-reformating-database-date-fields/m-p/2322638#M92562</link>
      <description>When I exported the results of a SQL query (against an Oracle database) to a flat file, I noticed Talend is changing the format for date fields. 
&lt;BR /&gt;SqlPlus output format (Format I would like the output to be): 
&lt;BR /&gt; 
&lt;B&gt;20-MAR-09 06.20.00.000000 PM&lt;/B&gt; 
&lt;BR /&gt;Talend: 
&lt;BR /&gt; 
&lt;B&gt;Fri Mar 20 18:20:00 MST 2009&lt;/B&gt; 
&lt;BR /&gt;I am using a tMap object and auto mapping the fields. 
&lt;BR /&gt;I tried the following for to go from a date to a date: 
&lt;BR /&gt; 
&lt;B&gt;Attempt 1:&lt;/B&gt; 
&lt;BR /&gt;TalendDate.setDate(row2.CREATE_DATE, 01, "dd-MMM-yy HH:mm:ss.SSSS") 
&lt;BR /&gt; 
&lt;B&gt;Attempt 2:&lt;/B&gt; 
&lt;BR /&gt;TalendDate.formatDate("dd-MMM-yy HH:mm:ss.SSSS", row2.CREATE_DATE) 
&lt;BR /&gt; 
&lt;B&gt;Attempt 3:&lt;/B&gt; 
&lt;BR /&gt;TalendDate.formatDate("day MMM dd HH:mm:ss yyyy", TalendDate.parseDate("dd-MMM-yy HH.mm.ss.SSSS PM",row2.CREATE_DATE)); 
&lt;BR /&gt; 
&lt;BR /&gt;Error: 
&lt;BR /&gt;Exception in thread "main" java.lang.Error: Unresolved compilation problem: 
&lt;BR /&gt; The method parseDate(String, String) in the type TalendDate is not applicable for the arguments (String, Date) 
&lt;BR /&gt; at myjob.tOracleInput_4Process(myjob.java:8776) 
&lt;BR /&gt; at myjob.runJobInTOS(myjob.java:11133) 
&lt;BR /&gt; at myjob.main(myjob.java:11049) 
&lt;BR /&gt;Job myjob ended at 16:02 14/09/2009.</description>
      <pubDate>Sat, 16 Nov 2024 13:46:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Talend-reformating-database-date-fields/m-p/2322638#M92562</guid>
      <dc:creator>talendtester</dc:creator>
      <dc:date>2024-11-16T13:46:05Z</dc:date>
    </item>
    <item>
      <title>Re: Talend reformating database date fields</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Talend-reformating-database-date-fields/m-p/2322639#M92563</link>
      <description>Hello 
&lt;BR /&gt;The method parseDate(String, String) parse a string a Date.
&lt;BR /&gt;The method formatDate(String, Date) format a Date to a string.
&lt;BR /&gt;In you case, row2.CREATE_DATE is a Date, and you want to format it to string with a pattern.
&lt;BR /&gt;So, you could use the following method to format a Date a string:
&lt;BR /&gt;TalendDate.formatDate("dd-MMM-yy HH:mm:ss.SSS aa", row2.CREATE_DATE)
&lt;BR /&gt;Best regards
&lt;BR /&gt; shong</description>
      <pubDate>Tue, 15 Sep 2009 03:13:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Talend-reformating-database-date-fields/m-p/2322639#M92563</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-09-15T03:13:32Z</dc:date>
    </item>
    <item>
      <title>Re: Talend reformating database date fields</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Talend-reformating-database-date-fields/m-p/2322640#M92564</link>
      <description>The following works when I change the &lt;B&gt;Output&lt;/B&gt; type to &lt;B&gt;String&lt;/B&gt; and leave the &lt;B&gt;Input&lt;/B&gt; type to &lt;B&gt;Date&lt;/B&gt;&lt;BR /&gt;TalendDate.&lt;B&gt;formatDate&lt;/B&gt;("dd-MMM-yy HH.mm.ss.SSSSSS aa",row2.CREATE_DATE);&lt;BR /&gt;&lt;B&gt;Why would Talend auto mapping change the formatting of date fields?&lt;/B&gt;</description>
      <pubDate>Tue, 15 Sep 2009 19:58:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Talend-reformating-database-date-fields/m-p/2322640#M92564</guid>
      <dc:creator>talendtester</dc:creator>
      <dc:date>2009-09-15T19:58:02Z</dc:date>
    </item>
    <item>
      <title>Re: Talend reformating database date fields</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Talend-reformating-database-date-fields/m-p/2322641#M92565</link>
      <description>Hello
&lt;BR /&gt;
&lt;BLOCKQUOTE&gt;
 &lt;TABLE border="1"&gt;
  &lt;TBODY&gt;
   &lt;TR&gt;
    &lt;TD&gt;Why would Talend auto mapping change the formatting of date fields?&lt;/TD&gt;
   &lt;/TR&gt;
  &lt;/TBODY&gt;
 &lt;/TABLE&gt;
&lt;/BLOCKQUOTE&gt;
&lt;BR /&gt;The input type is a Date, so Talend print it with the locale default format. If you want to see it in one pattern, you need format it as you do above.
&lt;BR /&gt;Best regards
&lt;BR /&gt; shong</description>
      <pubDate>Wed, 16 Sep 2009 02:40:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Talend-reformating-database-date-fields/m-p/2322641#M92565</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-09-16T02:40:26Z</dc:date>
    </item>
  </channel>
</rss>

