<?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: struggling with parseDate when I try System.out.println(TalendDate.parseDate(&amp;quot;dd-MM-yyyy HH:mm:ss&amp;quot;, &amp;quot;13-10-2010 12:23:45&amp;quot;)); in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/struggling-with-parseDate-when-I-try-System-out-println/m-p/2346802#M114154</link>
    <description>&lt;P&gt;Hello @adi nul​&amp;nbsp;,&lt;/P&gt;&lt;P&gt;The default date format for System.out.println(date1) is "&lt;B&gt;EEE MMM dd HH:mm:ss z yyyy&lt;/B&gt;"&lt;/P&gt;&lt;P&gt;if you want to change the output date format, you can use another method &lt;B&gt;System.out.printf()&lt;/B&gt;  like&lt;/P&gt;&lt;P&gt;&lt;B&gt;System.out.printf&lt;/B&gt;("&lt;B&gt;%tY-%&amp;lt;tm-%&amp;lt;td&lt;/B&gt;", date1);&lt;/P&gt;&lt;P&gt;​For your case, to keep the date type and specify the final format, you can use tMap component to convert the date and setup the  Date Pattern to &lt;B&gt;"yyyy-MM-dd"&lt;/B&gt; like the below&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000htM6DAAU.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/128730iA22258EF315F1A6B/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000htM6DAAU.png" alt="0695b00000htM6DAAU.png" /&gt;&lt;/span&gt;Best regards&lt;/P&gt;&lt;P&gt;Aiming&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 31 May 2023 01:04:25 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-05-31T01:04:25Z</dc:date>
    <item>
      <title>struggling with parseDate when I try System.out.println(TalendDate.parseDate("dd-MM-yyyy HH:mm:ss", "13-10-2010 12:23:45"));</title>
      <link>https://community.qlik.com/t5/Talend-Studio/struggling-with-parseDate-when-I-try-System-out-println/m-p/2346801#M114153</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;I understand TalendDate.parseDate changes a string into a Date.&lt;/P&gt;&lt;P&gt;It is supposed to returns a date in the specified format, but i don't know how to specify the format.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I understand the arguments in the function are below in bold:&lt;/P&gt;&lt;P&gt;TalendDate.parseDate("&lt;B&gt;format date of the string to be parsed"&lt;/B&gt;, &lt;B&gt;"string in the format of the date to be parsed&lt;/B&gt;")&lt;/P&gt;&lt;P&gt;As such, I never specify the format when I return the result&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, I have a tjava and i do:&lt;/P&gt;&lt;P&gt;System.out.println(TalendDate.parseDate("dd-MM-yyyy HH:mm:ss", "13-10-2010 12:23:45"));&lt;/P&gt;&lt;P&gt;and it returns this result:&lt;/P&gt;&lt;P&gt;&lt;B&gt;Wed Oct 13 12:23:45 CEST 2010&lt;/B&gt;&lt;/P&gt;&lt;P&gt;I never specifiied I want &lt;B&gt;Day of week, Month, Day, Time, CEST Yea&lt;/B&gt;r...&lt;/P&gt;&lt;P&gt;instead I want the result to be &lt;B&gt;YEAR MONTH DAY&lt;/B&gt;&lt;/P&gt;&lt;P&gt;I don't care about the time,&lt;/P&gt;&lt;P&gt;how can I specify the final format and the result should also be a date and not a string?&lt;/P&gt;&lt;P&gt;is it possible?&lt;/P&gt;&lt;P&gt;thank you&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 21:45:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/struggling-with-parseDate-when-I-try-System-out-println/m-p/2346801#M114153</guid>
      <dc:creator>BeginnerNeedsHelpPlease</dc:creator>
      <dc:date>2024-11-15T21:45:05Z</dc:date>
    </item>
    <item>
      <title>Re: struggling with parseDate when I try System.out.println(TalendDate.parseDate("dd-MM-yyyy HH:mm:ss", "13-10-2010 12:23:45"));</title>
      <link>https://community.qlik.com/t5/Talend-Studio/struggling-with-parseDate-when-I-try-System-out-println/m-p/2346802#M114154</link>
      <description>&lt;P&gt;Hello @adi nul​&amp;nbsp;,&lt;/P&gt;&lt;P&gt;The default date format for System.out.println(date1) is "&lt;B&gt;EEE MMM dd HH:mm:ss z yyyy&lt;/B&gt;"&lt;/P&gt;&lt;P&gt;if you want to change the output date format, you can use another method &lt;B&gt;System.out.printf()&lt;/B&gt;  like&lt;/P&gt;&lt;P&gt;&lt;B&gt;System.out.printf&lt;/B&gt;("&lt;B&gt;%tY-%&amp;lt;tm-%&amp;lt;td&lt;/B&gt;", date1);&lt;/P&gt;&lt;P&gt;​For your case, to keep the date type and specify the final format, you can use tMap component to convert the date and setup the  Date Pattern to &lt;B&gt;"yyyy-MM-dd"&lt;/B&gt; like the below&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000htM6DAAU.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/128730iA22258EF315F1A6B/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000htM6DAAU.png" alt="0695b00000htM6DAAU.png" /&gt;&lt;/span&gt;Best regards&lt;/P&gt;&lt;P&gt;Aiming&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 31 May 2023 01:04:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/struggling-with-parseDate-when-I-try-System-out-println/m-p/2346802#M114154</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-05-31T01:04:25Z</dc:date>
    </item>
    <item>
      <title>Re: struggling with parseDate when I try System.out.println(TalendDate.parseDate("dd-MM-yyyy HH:mm:ss", "13-10-2010 12:23:45"));</title>
      <link>https://community.qlik.com/t5/Talend-Studio/struggling-with-parseDate-when-I-try-System-out-println/m-p/2346803#M114155</link>
      <description>&lt;P&gt;You should never rely on the default behaviour of the JVM version. The default format for the Date-2-String conversion is always a matter of change. Please use always the TalendDate routines to convert Strings to Date and Date to String.&lt;/P&gt;</description>
      <pubDate>Wed, 31 May 2023 12:08:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/struggling-with-parseDate-when-I-try-System-out-println/m-p/2346803#M114155</guid>
      <dc:creator>jlolling</dc:creator>
      <dc:date>2023-05-31T12:08:22Z</dc:date>
    </item>
  </channel>
</rss>

