<?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: [resolved] Date methods in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/resolved-Date-methods/m-p/2311385#M82432</link>
    <description>I tried using the following and none of them seemed to work.&amp;nbsp; I was hoping to set this as the default value if nothing was provided.&amp;nbsp;
&lt;BR /&gt;Date()&amp;nbsp; --&amp;gt;&amp;nbsp; The method Date() is undefined for the type MDMGameSystem_Load
&lt;BR /&gt;TalendDate.getDate("yyyy-mm-dd") --&amp;gt; the method put(String, String) in the type Map&amp;lt;String, String&amp;gt; is not applicable for the arguments (String, Date)
&lt;BR /&gt;Type mismatch: cannot convert from Sting to Date
&lt;BR /&gt;TalendDate.getCurrentDate() --&amp;gt; the method put(String, String) in the type Map&amp;lt;String, String&amp;gt; is not applicable for the arguments (String, Date)
&lt;BR /&gt;TalendDate.formatDate("yyyy-MM-dd", new Date()) --&amp;gt; Type mismatch: cannot convert from Sting to Date
&lt;BR /&gt;the method put(String, String) in the type Map&amp;lt;String, String&amp;gt; is not applicable for the arguments (String, Date)
&lt;BR /&gt;
&lt;FONT size="2"&gt;TalendDate.&lt;U&gt;parseDate&lt;/U&gt;("yyyy-MM-dd", &lt;/FONT&gt;TalendDate.getCurrentDate()) --&amp;gt; Exception in thread "main" java.lang.Error: Unresolved compilation problem</description>
    <pubDate>Tue, 19 Aug 2014 14:05:13 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2014-08-19T14:05:13Z</dc:date>
    <item>
      <title>[resolved] Date methods</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Date-methods/m-p/2311383#M82430</link>
      <description>Hi All&amp;nbsp;
&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I have a date in my input files which is of string type and i want my output should be in date data type and format should be "yyyy/MM/dd"
&lt;BR /&gt;The input can have more than one date format.I tried all the ways which are provided in the forum
&lt;BR /&gt;I tried using FormateDate() and parseDate() methods but i couldn't able to convert .
&lt;BR /&gt;Can anyone help me in this and which methos is most appropriate among the 2 methods.
&lt;BR /&gt;
&lt;BR /&gt;Thanks,
&lt;BR /&gt;lmit.</description>
      <pubDate>Thu, 14 Aug 2014 07:23:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Date-methods/m-p/2311383#M82430</guid>
      <dc:creator>lmit</dc:creator>
      <dc:date>2014-08-14T07:23:52Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Date methods</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Date-methods/m-p/2311384#M82431</link>
      <description>Hi lmit,&lt;BR /&gt;If input contains different date formats, do you have any logical method to understand that this particular date is in specific format, so that we can apply appropriate transformation to convert date.&lt;BR /&gt;In order to format or parse date, we need to provide date format string, else it can't convert. And this is something can't be automated using existing functions. But using some rule based method, we can try to devise some logic, but need to understand the business scenarios for input dates.&lt;BR /&gt;Thanks&lt;BR /&gt;vaibhav</description>
      <pubDate>Thu, 14 Aug 2014 07:35:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Date-methods/m-p/2311384#M82431</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-08-14T07:35:14Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Date methods</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Date-methods/m-p/2311385#M82432</link>
      <description>I tried using the following and none of them seemed to work.&amp;nbsp; I was hoping to set this as the default value if nothing was provided.&amp;nbsp;
&lt;BR /&gt;Date()&amp;nbsp; --&amp;gt;&amp;nbsp; The method Date() is undefined for the type MDMGameSystem_Load
&lt;BR /&gt;TalendDate.getDate("yyyy-mm-dd") --&amp;gt; the method put(String, String) in the type Map&amp;lt;String, String&amp;gt; is not applicable for the arguments (String, Date)
&lt;BR /&gt;Type mismatch: cannot convert from Sting to Date
&lt;BR /&gt;TalendDate.getCurrentDate() --&amp;gt; the method put(String, String) in the type Map&amp;lt;String, String&amp;gt; is not applicable for the arguments (String, Date)
&lt;BR /&gt;TalendDate.formatDate("yyyy-MM-dd", new Date()) --&amp;gt; Type mismatch: cannot convert from Sting to Date
&lt;BR /&gt;the method put(String, String) in the type Map&amp;lt;String, String&amp;gt; is not applicable for the arguments (String, Date)
&lt;BR /&gt;
&lt;FONT size="2"&gt;TalendDate.&lt;U&gt;parseDate&lt;/U&gt;("yyyy-MM-dd", &lt;/FONT&gt;TalendDate.getCurrentDate()) --&amp;gt; Exception in thread "main" java.lang.Error: Unresolved compilation problem</description>
      <pubDate>Tue, 19 Aug 2014 14:05:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Date-methods/m-p/2311385#M82432</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-08-19T14:05:13Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Date methods</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Date-methods/m-p/2311386#M82433</link>
      <description>Hi,
&lt;BR /&gt;I tried with "yyyy/MM/dd" formatted string. Both of these example give me correct results:
&lt;BR /&gt;ex 1: TalendDate.parseDate("yyyy/MM/dd",a.newColumnDate) 
&lt;BR /&gt;ex 2: new java.text.SimpleDateFormat("yyyy/MM/dd").parse(a.newColumnDate) 
&lt;BR /&gt;If you have many possible formats to test, I think that a custom routine that use SimpleDateFormat (I presume you have to use cascading conditional blocks) is more useful.
&lt;BR /&gt;bye</description>
      <pubDate>Wed, 20 Aug 2014 08:51:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Date-methods/m-p/2311386#M82433</guid>
      <dc:creator>gorotman</dc:creator>
      <dc:date>2014-08-20T08:51:50Z</dc:date>
    </item>
  </channel>
</rss>

