<?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: How to convert a column having only month names(string) to date in talend in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/How-to-convert-a-column-having-only-month-names-string-to-date/m-p/2202926#M4446</link>
    <description>&lt;P&gt;tTypeConvert - will not work&lt;/P&gt;
&lt;P&gt;but tMap - easy&lt;/P&gt;
&lt;PRE&gt;TalendDate.parseDate("MMM",row1.month) &lt;/PRE&gt;
&lt;P&gt;the problem is - it will always return 1970-month-01 because you do not know - what year?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;for example for the current year, the function could be:&lt;/P&gt;
&lt;PRE&gt;TalendDate.parseDate("yyyy-MMM",TalendDate.formatDate("yyyy",TalendDate.getCurrentDate())+"-"+row1.month) &lt;/PRE&gt;
&lt;P&gt;result for first and second:&lt;/P&gt;
&lt;PRE&gt;.----------+----------.
|      tLogRow_1      |
|=---------+---------=|
|date      |date2     |
|=---------+---------=|
|1970-01-01|2018-01-01|
|1970-02-01|2018-02-01|
|1970-03-01|2018-03-01|
'----------+----------'&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 02 Dec 2018 09:37:01 GMT</pubDate>
    <dc:creator>vapukov</dc:creator>
    <dc:date>2018-12-02T09:37:01Z</dc:date>
    <item>
      <title>How to convert a column having only month names(string) to date in talend</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-convert-a-column-having-only-month-names-string-to-date/m-p/2202925#M4445</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you pls help out with this at the earliest. I have a dataset in which i have a column containg month names namely Jan, Feb... which i want to convert to date type.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried using tMap in which i used parseDate.&lt;/P&gt;
&lt;P&gt;I also tried using tConvertType but it throws an error as unable to parse the date "Jan"&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;java.text.ParseException: Unparseable date: "Jan" &lt;/STRONG&gt;and so on...&lt;/P&gt;
&lt;P&gt;I did convert the datatype to date and ticked autocast and used the relevant syntax in parseDate.. Pls can someone help&lt;/P&gt;</description>
      <pubDate>Sun, 02 Dec 2018 09:26:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-convert-a-column-having-only-month-names-string-to-date/m-p/2202925#M4445</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-12-02T09:26:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert a column having only month names(string) to date in talend</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-convert-a-column-having-only-month-names-string-to-date/m-p/2202926#M4446</link>
      <description>&lt;P&gt;tTypeConvert - will not work&lt;/P&gt;
&lt;P&gt;but tMap - easy&lt;/P&gt;
&lt;PRE&gt;TalendDate.parseDate("MMM",row1.month) &lt;/PRE&gt;
&lt;P&gt;the problem is - it will always return 1970-month-01 because you do not know - what year?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;for example for the current year, the function could be:&lt;/P&gt;
&lt;PRE&gt;TalendDate.parseDate("yyyy-MMM",TalendDate.formatDate("yyyy",TalendDate.getCurrentDate())+"-"+row1.month) &lt;/PRE&gt;
&lt;P&gt;result for first and second:&lt;/P&gt;
&lt;PRE&gt;.----------+----------.
|      tLogRow_1      |
|=---------+---------=|
|date      |date2     |
|=---------+---------=|
|1970-01-01|2018-01-01|
|1970-02-01|2018-02-01|
|1970-03-01|2018-03-01|
'----------+----------'&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 02 Dec 2018 09:37:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-convert-a-column-having-only-month-names-string-to-date/m-p/2202926#M4446</guid>
      <dc:creator>vapukov</dc:creator>
      <dc:date>2018-12-02T09:37:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert a column having only month names(string) to date in talend</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-convert-a-column-having-only-month-names-string-to-date/m-p/2202927#M4447</link>
      <description>&lt;P&gt;Thank you so much Mr. Vapukov. Highly appreciate the timely help.&amp;nbsp;It worked and returned as stated by you i.e 1-01-2018 ...&lt;/P&gt;</description>
      <pubDate>Sun, 02 Dec 2018 10:15:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-convert-a-column-having-only-month-names-string-to-date/m-p/2202927#M4447</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-12-02T10:15:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert a column having only month names(string) to date in talend</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-convert-a-column-having-only-month-names-string-to-date/m-p/2202928#M4448</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/005390000067LRbAAM"&gt;@vapukov&lt;/A&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;i have a string field coming in with "ABC0215" which i need to convert to the current date. i've used the expression&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;TalendDate.parseDate("MMdd", (StringHandling.RIGHT(row5.symbol2, 4))) &lt;/PRE&gt; 
&lt;P&gt;but, as you mentioned earlier, it converts to 1970. tried various steps to get to 2020, but can't figure it out. would you know what the expression should be to get date "15-02-2020"?&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jan 2020 21:46:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-convert-a-column-having-only-month-names-string-to-date/m-p/2202928#M4448</guid>
      <dc:creator>zalibra</dc:creator>
      <dc:date>2020-01-30T21:46:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert a column having only month names(string) to date in talend</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-convert-a-column-having-only-month-names-string-to-date/m-p/2202929#M4449</link>
      <description>&lt;P&gt;actually, figured it out.&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;TalendDate.parseDate("yyyyMMdd", TalendDate.formatDate("yyyy", TalendDate.getCurrentDate())+ (StringHandling.RIGHT(row5.symbol2, 4))) &lt;/PRE&gt; 
&lt;P&gt;thank you for pointing me in the right direction.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jan 2020 22:21:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-convert-a-column-having-only-month-names-string-to-date/m-p/2202929#M4449</guid>
      <dc:creator>zalibra</dc:creator>
      <dc:date>2020-01-30T22:21:42Z</dc:date>
    </item>
  </channel>
</rss>

