<?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 [resolved] parseDate and combining date and time part from different columns. in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/resolved-parseDate-and-combining-date-and-time-part-from/m-p/2300786#M72974</link>
    <description>Hello. 
&lt;BR /&gt;I'm trying to combine two different columns from 
&lt;BR /&gt;a delimited file into a one column.&amp;nbsp; The values look 
&lt;BR /&gt;"08.08.2014" and "13:57" and since I'm testing limiting 
&lt;BR /&gt;to one row only, those values really are in place. 
&lt;BR /&gt;Right now I'm using: 
&lt;BR /&gt; 
&lt;PRE&gt;TalendDate.parseDate(TalendDate.formatDate("dd.MM.yyyy",row1.MYDATECOLUMN)+ " " + TalendDate.formatDate("HH:mm",row1.MyTIMECOLUMN), "dd.MM.yyyy HH:mm")&lt;BR /&gt;&lt;/PRE&gt; 
&lt;BR /&gt;which gives me error: 
&lt;BR /&gt; 
&lt;PRE&gt;Exception in component tMap_1&lt;BR /&gt;java.lang.RuntimeException: java.text.ParseException: Unparseable date: "dd.MM.yyyy HH:mm"&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at routines.TalendDate.parseDate(TalendDate.java:864)&lt;BR /&gt;&lt;/PRE&gt; 
&lt;BR /&gt;The formatDates apparently work since I can output 
&lt;BR /&gt;that combination as a string. Please help, after trying 
&lt;BR /&gt;too many times I seem blind to my own solutions. 
&lt;BR /&gt;By the way, do I need to state the length for that variable 
&lt;BR /&gt;in out1 and if I do what would the length be for example 
&lt;BR /&gt;for date patterns "dd.MM.yyyy" or "dd.MM.yyyy HH:mm"? 
&lt;BR /&gt;Those dates will eventually end up into a PostgreSQL db. 
&lt;BR /&gt;Thanks.</description>
    <pubDate>Fri, 08 Aug 2014 10:19:26 GMT</pubDate>
    <dc:creator>_AnonymousUser</dc:creator>
    <dc:date>2014-08-08T10:19:26Z</dc:date>
    <item>
      <title>[resolved] parseDate and combining date and time part from different columns.</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-parseDate-and-combining-date-and-time-part-from/m-p/2300786#M72974</link>
      <description>Hello. 
&lt;BR /&gt;I'm trying to combine two different columns from 
&lt;BR /&gt;a delimited file into a one column.&amp;nbsp; The values look 
&lt;BR /&gt;"08.08.2014" and "13:57" and since I'm testing limiting 
&lt;BR /&gt;to one row only, those values really are in place. 
&lt;BR /&gt;Right now I'm using: 
&lt;BR /&gt; 
&lt;PRE&gt;TalendDate.parseDate(TalendDate.formatDate("dd.MM.yyyy",row1.MYDATECOLUMN)+ " " + TalendDate.formatDate("HH:mm",row1.MyTIMECOLUMN), "dd.MM.yyyy HH:mm")&lt;BR /&gt;&lt;/PRE&gt; 
&lt;BR /&gt;which gives me error: 
&lt;BR /&gt; 
&lt;PRE&gt;Exception in component tMap_1&lt;BR /&gt;java.lang.RuntimeException: java.text.ParseException: Unparseable date: "dd.MM.yyyy HH:mm"&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at routines.TalendDate.parseDate(TalendDate.java:864)&lt;BR /&gt;&lt;/PRE&gt; 
&lt;BR /&gt;The formatDates apparently work since I can output 
&lt;BR /&gt;that combination as a string. Please help, after trying 
&lt;BR /&gt;too many times I seem blind to my own solutions. 
&lt;BR /&gt;By the way, do I need to state the length for that variable 
&lt;BR /&gt;in out1 and if I do what would the length be for example 
&lt;BR /&gt;for date patterns "dd.MM.yyyy" or "dd.MM.yyyy HH:mm"? 
&lt;BR /&gt;Those dates will eventually end up into a PostgreSQL db. 
&lt;BR /&gt;Thanks.</description>
      <pubDate>Fri, 08 Aug 2014 10:19:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-parseDate-and-combining-date-and-time-part-from/m-p/2300786#M72974</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2014-08-08T10:19:26Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] parseDate and combining date and time part from different columns.</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-parseDate-and-combining-date-and-time-part-from/m-p/2300787#M72975</link>
      <description>And for some reason, just like the last time, 
&lt;BR /&gt;when I try to log in, it shows me my credentials
&lt;BR /&gt;but I still need to fill in my name and email when
&lt;BR /&gt;posting and get demoted to a guest. 
&lt;BR /&gt;Sorry about that. I need to look into it later.</description>
      <pubDate>Fri, 08 Aug 2014 10:24:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-parseDate-and-combining-date-and-time-part-from/m-p/2300787#M72975</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2014-08-08T10:24:09Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] parseDate and combining date and time part from different columns.</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-parseDate-and-combining-date-and-time-part-from/m-p/2300788#M72976</link>
      <description>&lt;FONT face="consolas, monaco, 'bitstream vera sans mono', 'courier new', courier, monospace"&gt;Hi James,&amp;nbsp;&lt;/FONT&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;FONT face="consolas, monaco, 'bitstream vera sans mono', 'courier new', courier, monospace"&gt;first try concatenating both date fields and they try converting... like below (Below I am assuming both of your fields are string, if not, then first convert it to string, concatenate and assign to some string variable and then use that variable in below statement)&lt;/FONT&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;FONT face="consolas, monaco, 'bitstream vera sans mono', 'courier new', courier, monospace"&gt;TalendDate.parseDate(TalendDate.formatDate("dd.MM.yyyy&amp;nbsp;&lt;/FONT&gt;
&lt;FONT size="2"&gt;&lt;FONT face="consolas, monaco, 'bitstream vera sans mono', 'courier new', courier, monospace"&gt;HH:mm&lt;/FONT&gt;&lt;/FONT&gt;
&lt;FONT size="2"&gt;&lt;FONT face="consolas, monaco, 'bitstream vera sans mono', 'courier new', courier, monospace"&gt;",row1.MYDATECOLUMN+&lt;/FONT&gt;&lt;/FONT&gt;
&lt;FONT size="2"&gt;&lt;FONT face="consolas, monaco, 'bitstream vera sans mono', 'courier new', courier, monospace"&gt;row1.MyTIMECOLUMN&lt;/FONT&gt;&lt;/FONT&gt;
&lt;FONT size="2"&gt;&lt;FONT face="consolas, monaco, 'bitstream vera sans mono', 'courier new', courier, monospace"&gt;))&lt;/FONT&gt;&lt;/FONT&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;FONT size="2"&gt;&lt;FONT face="consolas, monaco, 'bitstream vera sans mono', 'courier new', courier, monospace"&gt;Vaibhav&lt;/FONT&gt;&lt;/FONT&gt;</description>
      <pubDate>Fri, 08 Aug 2014 10:54:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-parseDate-and-combining-date-and-time-part-from/m-p/2300788#M72976</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-08-08T10:54:54Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] parseDate and combining date and time part from different columns.</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-parseDate-and-combining-date-and-time-part-from/m-p/2300789#M72977</link>
      <description>&lt;BLOCKQUOTE&gt; 
 &lt;TABLE border="1"&gt; 
  &lt;TBODY&gt; 
   &lt;TR&gt; 
    &lt;TD&gt;&lt;FONT face="consolas, monaco, 'bitstream vera sans mono', 'courier new', courier, monospace"&gt;first try concatenating both date fields and they try converting... like below (Below I am assuming both of your fields are string, if not, then first convert it to string, concatenate and assign to some string variable and then use that variable in below statement)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="consolas, monaco, 'bitstream vera sans mono', 'courier new', courier, monospace"&gt;TalendDate.parseDate(TalendDate.formatDate("dd.MM.yyyy&amp;nbsp;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;FONT face="consolas, monaco, 'bitstream vera sans mono', 'courier new', courier, monospace"&gt;HH:mm&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;FONT face="consolas, monaco, 'bitstream vera sans mono', 'courier new', courier, monospace"&gt;",row1.MYDATECOLUMN+&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;FONT face="consolas, monaco, 'bitstream vera sans mono', 'courier new', courier, monospace"&gt;row1.MyTIMECOLUMN&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;FONT face="consolas, monaco, 'bitstream vera sans mono', 'courier new', courier, monospace"&gt;))&lt;/FONT&gt;&lt;/FONT&gt;&lt;/TD&gt; 
   &lt;/TR&gt; 
  &lt;/TBODY&gt; 
 &lt;/TABLE&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;BR /&gt;Thank you but that did't work, since 
&lt;B&gt;formatDate&lt;/B&gt; apparently 
&lt;BR /&gt;takes in ( 
&lt;B&gt;String, Date&lt;/B&gt;) and I'd have to first combine those 
&lt;BR /&gt;to columns into a 
&lt;B&gt;Date&lt;/B&gt;, which is my main goal. 
&lt;BR /&gt;At first I was trying to read the columns in as 
&lt;B&gt;Date&lt;/B&gt;s but 
&lt;BR /&gt;is it even possible to read in date format 
&lt;B&gt;HH:mm&lt;/B&gt;?</description>
      <pubDate>Fri, 08 Aug 2014 11:22:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-parseDate-and-combining-date-and-time-part-from/m-p/2300789#M72977</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2014-08-08T11:22:33Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] parseDate and combining date and time part from different columns.</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-parseDate-and-combining-date-and-time-part-from/m-p/2300790#M72978</link>
      <description>String date1="08.08.2014";&lt;BR /&gt;String date2 = "13:57";&lt;BR /&gt;String totDate = date1+" "+date2;&lt;BR /&gt;System.out.println(totDate);&lt;BR /&gt;TalendDate.parseDate("dd.MM.yyyy HH:mm",totDate));&lt;BR /&gt;&lt;BR /&gt;Above works if both date and time are string..., else you need to do some manipulations...&lt;BR /&gt;Vaibhav</description>
      <pubDate>Fri, 08 Aug 2014 11:33:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-parseDate-and-combining-date-and-time-part-from/m-p/2300790#M72978</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-08-08T11:33:52Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] parseDate and combining date and time part from different columns.</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-parseDate-and-combining-date-and-time-part-from/m-p/2300791#M72979</link>
      <description>&lt;BLOCKQUOTE&gt;
 &lt;TABLE border="1"&gt;
  &lt;TBODY&gt;
   &lt;TR&gt;
    &lt;TD&gt;String date1="08.08.2014";&lt;BR /&gt;String date2 = "13:57";&lt;BR /&gt;String totDate = date1+" "+date2;&lt;BR /&gt;System.out.println(totDate);&lt;BR /&gt;TalendDate.parseDate("dd.MM.yyyy HH:mm",totDate));&lt;BR /&gt;Above works if both date and time are string..., else you need to do some manipulations...&lt;/TD&gt;
   &lt;/TR&gt;
  &lt;/TBODY&gt;
 &lt;/TABLE&gt;
&lt;/BLOCKQUOTE&gt;
&lt;BR /&gt;OK, I got it, thank you.
&lt;BR /&gt;Anyway, my final form of the solution for my problem, where
&lt;BR /&gt;my date column 
&lt;B&gt;row1.MYDATECOLUMN&lt;/B&gt; is in 
&lt;B&gt;Date&lt;/B&gt; format and 
&lt;BR /&gt;time column 
&lt;B&gt;row1.MYTIMECOLUMN&lt;/B&gt; is a 
&lt;B&gt;String&lt;/B&gt; and I wanted
&lt;BR /&gt;to combine them and convert to a 
&lt;B&gt;Date&lt;/B&gt;:
&lt;BR /&gt;So, first convert the 
&lt;B&gt;Date&lt;/B&gt; part into a 
&lt;B&gt;String&lt;/B&gt; with:
&lt;BR /&gt;
&lt;BR /&gt;
&lt;PRE&gt;TalendDate.formatDate("dd.MM.yyyy", row1.MYDATECOLUMN)&lt;BR /&gt;&lt;/PRE&gt;
&lt;BR /&gt;then catenate the time part 
&lt;B&gt;String&lt;/B&gt; to the end with:
&lt;BR /&gt;&amp;nbsp;
&lt;BR /&gt;
&lt;PRE&gt;+" "+row1.MYTIMECOLUMN&lt;/PRE&gt;
&lt;BR /&gt;and use 
&lt;B&gt;parseDate&lt;/B&gt; to convert the combined 
&lt;B&gt;String&lt;/B&gt; into 
&lt;B&gt;Date&lt;/B&gt; like:
&lt;BR /&gt;
&lt;BR /&gt;
&lt;PRE&gt;TalendDate.parseDate("dd.MM.yyyy HH:mm", TalendDate.formatDate("dd.MM.yyyy", row1.MYDATECOLUMN)+" "+row1.MYTIMECOLUMN)&lt;BR /&gt;&lt;/PRE&gt;
&lt;BR /&gt;Thanks Vaibhav.</description>
      <pubDate>Fri, 08 Aug 2014 12:49:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-parseDate-and-combining-date-and-time-part-from/m-p/2300791#M72979</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2014-08-08T12:49:09Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] parseDate and combining date and time part from different columns.</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-parseDate-and-combining-date-and-time-part-from/m-p/2300792#M72980</link>
      <description>Great...
&lt;BR /&gt;Thanks James for this update
&lt;BR /&gt;
&lt;BR /&gt;Vaibhav</description>
      <pubDate>Fri, 08 Aug 2014 12:53:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-parseDate-and-combining-date-and-time-part-from/m-p/2300792#M72980</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-08-08T12:53:45Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] parseDate and combining date and time part from different columns.</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-parseDate-and-combining-date-and-time-part-from/m-p/2300793#M72981</link>
      <description>This thread is resolved. Could someone with appropriate rights &lt;BR /&gt;mark this resolved as I being a guest cannot. Thank you.&lt;BR /&gt;JB</description>
      <pubDate>Mon, 11 Aug 2014 07:40:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-parseDate-and-combining-date-and-time-part-from/m-p/2300793#M72981</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2014-08-11T07:40:42Z</dc:date>
    </item>
  </channel>
</rss>

