<?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: String to date conversion in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/String-to-date-conversion/m-p/2316412#M86959</link>
    <description>&lt;P&gt;i shoudn't drop records, because after this transmission those blank date fields will be having a data thru front end. I need to pass these blanks. Hence i did like below in tMap but it didnt work. Please suggest.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;row2.DiagnosisActivityStartDate == "" ? "" :&amp;nbsp; TalendDate.formatDate("MM-dd-yyyy",TalendDate.parseDate("yyyy-MM-dd",row2.DiagnosisActivityStartDate))&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 09 May 2018 09:16:15 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-05-09T09:16:15Z</dc:date>
    <item>
      <title>String to date conversion</title>
      <link>https://community.qlik.com/t5/Talend-Studio/String-to-date-conversion/m-p/2316402#M86949</link>
      <description>&lt;P&gt;My input from database is having "date" in string datatype with size 50, which is sending date in yyyy-mm-dd format. I want to store it at the destination in String(50) with mm-dd-yyyy format. Solution please.&lt;/P&gt;</description>
      <pubDate>Wed, 09 May 2018 05:29:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/String-to-date-conversion/m-p/2316402#M86949</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-05-09T05:29:15Z</dc:date>
    </item>
    <item>
      <title>Re: String to date conversion</title>
      <link>https://community.qlik.com/t5/Talend-Studio/String-to-date-conversion/m-p/2316403#M86950</link>
      <description>&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;to convert string to date you have to use talendDate routines available with in the talend code repo.&lt;/P&gt;&lt;P&gt;Here is how you can convert a string in to date.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;TalendDate.parseDate("format date of the string to be parsed", "string in the format of the date to be parsed")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;And to limit the length of the string, define its size in the schema.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 09 May 2018 05:54:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/String-to-date-conversion/m-p/2316403#M86950</guid>
      <dc:creator>KarthikGs</dc:creator>
      <dc:date>2018-05-09T05:54:32Z</dc:date>
    </item>
    <item>
      <title>Re: String to date conversion</title>
      <link>https://community.qlik.com/t5/Talend-Studio/String-to-date-conversion/m-p/2316404#M86951</link>
      <description>Try this:&lt;BR /&gt;TalendDate.formatDate("mm-dd-yyyy", TalendDate.parseDate("yyyy-mm-dd", row1.yourDatabaseField))</description>
      <pubDate>Wed, 09 May 2018 06:00:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/String-to-date-conversion/m-p/2316404#M86951</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2018-05-09T06:00:45Z</dc:date>
    </item>
    <item>
      <title>Re: String to date conversion</title>
      <link>https://community.qlik.com/t5/Talend-Studio/String-to-date-conversion/m-p/2316405#M86952</link>
      <description>&lt;P&gt;I am getting error. Actually, the input field which is sending date is string(50) and output field is also in string(50).&amp;nbsp;Please suggest.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or, Can we just shuffle it using only string function? like, currently i am getting yyyy-mm-dd, and shuffle it to mm-dd-yyyy. is it possible with any function?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 May 2018 06:15:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/String-to-date-conversion/m-p/2316405#M86952</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-05-09T06:15:41Z</dc:date>
    </item>
    <item>
      <title>Re: String to date conversion</title>
      <link>https://community.qlik.com/t5/Talend-Studio/String-to-date-conversion/m-p/2316406#M86953</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;What's the error are you getting?&lt;/P&gt;
&lt;P&gt;Could you please post your current job setting screenshot on forum? Are you using tMap component in your job?&lt;/P&gt;
&lt;P&gt;Best regards&lt;/P&gt;
&lt;P&gt;Sabrina&lt;/P&gt;</description>
      <pubDate>Wed, 09 May 2018 06:56:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/String-to-date-conversion/m-p/2316406#M86953</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-05-09T06:56:11Z</dc:date>
    </item>
    <item>
      <title>Re: String to date conversion</title>
      <link>https://community.qlik.com/t5/Talend-Studio/String-to-date-conversion/m-p/2316407#M86954</link>
      <description>&lt;P&gt;i have attached the screen shot, please suggest&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;error is:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;[statistics] connecting to socket on port 3456&lt;BR /&gt;[statistics] connected&lt;BR /&gt;java.lang.NumberFormatException: For input string: "row2"&lt;BR /&gt;at java.lang.NumberFormatException.forInputString(Unknown Source)&lt;BR /&gt;at java.lang.Integer.parseInt(Unknown Source)&lt;BR /&gt;at java.lang.Integer.parseInt(Unknown Source)&lt;BR /&gt;at routines.system.FastDateParser$DateParser.parse(FastDateParser.java:127)&lt;BR /&gt;at java.text.DateFormat.parse(Unknown Source)&lt;BR /&gt;at routines.TalendDate.parseDate(TalendDate.java:884)&lt;BR /&gt;at routines.TalendDate.parseDate(TalendDate.java:842)&lt;BR /&gt;at ocm.ocm_data_extraction_0_1.OCM_Data_Extraction.tDBInput_5Process(OCM_Data_Extraction.java:2846)&lt;BR /&gt;at ocm.ocm_data_extraction_0_1.OCM_Data_Extraction.tDBInput_2Process(OCM_Data_Extraction.java:1014)&lt;BR /&gt;at ocm.ocm_data_extraction_0_1.OCM_Data_Extraction.runJobInTOS(OCM_Data_Extraction.java:3648)&lt;BR /&gt;at ocm.ocm_data_extraction_0_1.OCM_Data_Extraction.main(OCM_Data_Extraction.java:3497)&lt;BR /&gt;Exception in component tMap_2 (OCM_Data_Extraction)&lt;BR /&gt;java.lang.RuntimeException: java.text.ParseException: Unparseable date: "row2.DiagnosisActivityStartDate"&lt;BR /&gt;at routines.TalendDate.parseDate(TalendDate.java:898)&lt;BR /&gt;at routines.TalendDate.parseDate(TalendDate.java:842)&lt;BR /&gt;at ocm.ocm_data_extraction_0_1.OCM_Data_Extraction.tDBInput_5Process(OCM_Data_Extraction.java:2846)&lt;BR /&gt;at ocm.ocm_data_extraction_0_1.OCM_Data_Extraction.tDBInput_2Process(OCM_Data_Extraction.java:1014)&lt;BR /&gt;at ocm.ocm_data_extraction_0_1.OCM_Data_Extraction.runJobInTOS(OCM_Data_Extraction.java:3648)&lt;BR /&gt;at ocm.ocm_data_extraction_0_1.OCM_Data_Extraction.main(OCM_Data_Extraction.java:3497)&lt;BR /&gt;Caused by: java.text.ParseException: Unparseable date: "row2.DiagnosisActivityStartDate"&lt;BR /&gt;at java.text.DateFormat.parse(Unknown Source)&lt;BR /&gt;at routines.TalendDate.parseDate(TalendDate.java:884)&lt;BR /&gt;... 5 more&lt;BR /&gt;[statistics] disconnected&lt;/P&gt;&lt;BR /&gt;&lt;A href="https://community.qlik.com/legacyfs/online/tlnd_dw_files/0683p000009Lsms"&gt;Graph1.jpg&lt;/A&gt;</description>
      <pubDate>Wed, 09 May 2018 07:01:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/String-to-date-conversion/m-p/2316407#M86954</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-05-09T07:01:37Z</dc:date>
    </item>
    <item>
      <title>Re: String to date conversion</title>
      <link>https://community.qlik.com/t5/Talend-Studio/String-to-date-conversion/m-p/2316408#M86955</link>
      <description>You need to remove double quotes arround row2.DiagnosisActivityStartDate in tne Modified_Data flow</description>
      <pubDate>Wed, 09 May 2018 07:14:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/String-to-date-conversion/m-p/2316408#M86955</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2018-05-09T07:14:09Z</dc:date>
    </item>
    <item>
      <title>Re: String to date conversion</title>
      <link>https://community.qlik.com/t5/Talend-Studio/String-to-date-conversion/m-p/2316409#M86956</link>
      <description>&lt;P&gt;Thanks TRF.... its resolved....&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 May 2018 07:24:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/String-to-date-conversion/m-p/2316409#M86956</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-05-09T07:24:45Z</dc:date>
    </item>
    <item>
      <title>Re: String to date conversion</title>
      <link>https://community.qlik.com/t5/Talend-Studio/String-to-date-conversion/m-p/2316410#M86957</link>
      <description>&lt;P&gt;earlier it ran fine. Now its showing below error.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;EM&gt;I just noticed that, some of the fields from the input is having blank in date field. How to handle this&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;statistics] connecting to socket on port 4016&lt;BR /&gt;[statistics] connected&lt;BR /&gt;java.lang.StringIndexOutOfBoundsException: String index out of range: 4&lt;BR /&gt;at java.lang.String.substring(Unknown Source)&lt;BR /&gt;at routines.system.FastDateParser$DateParser.parse(FastDateParser.java:127)&lt;BR /&gt;at java.text.DateFormat.parse(Unknown Source)&lt;BR /&gt;at routines.TalendDate.parseDate(TalendDate.java:884)&lt;BR /&gt;at routines.TalendDate.parseDate(TalendDate.java:842)&lt;BR /&gt;at ocm.ocm_data_extraction_0_1.OCM_Data_Extraction.tDBInput_5Process(OCM_Data_Extraction.java:2762)&lt;BR /&gt;at ocm.ocm_data_extraction_0_1.OCM_Data_Extraction.tDBInput_2Process(OCM_Data_Extraction.java:998)&lt;BR /&gt;at ocm.ocm_data_extraction_0_1.OCM_Data_Extraction.runJobInTOS(OCM_Data_Extraction.java:3589)&lt;BR /&gt;at ocm.ocm_data_extraction_0_1.OCM_Data_Extraction.main(OCM_Data_Extraction.java:3438)&lt;BR /&gt;Exception in component tMap_2 (OCM_Data_Extraction)&lt;BR /&gt;java.lang.RuntimeException: java.text.ParseException: Unparseable date: ""&lt;BR /&gt;at routines.TalendDate.parseDate(TalendDate.java:898)&lt;BR /&gt;at routines.TalendDate.parseDate(TalendDate.java:842)&lt;BR /&gt;at ocm.ocm_data_extraction_0_1.OCM_Data_Extraction.tDBInput_5Process(OCM_Data_Extraction.java:2762)&lt;BR /&gt;at ocm.ocm_data_extraction_0_1.OCM_Data_Extraction.tDBInput_2Process(OCM_Data_Extraction.java:998)&lt;BR /&gt;at ocm.ocm_data_extraction_0_1.OCM_Data_Extraction.runJobInTOS(OCM_Data_Extraction.java:3589)&lt;BR /&gt;at ocm.ocm_data_extraction_0_1.OCM_Data_Extraction.main(OCM_Data_Extraction.java:3438)&lt;BR /&gt;Caused by: java.text.ParseException: Unparseable date: ""&lt;BR /&gt;at java.text.DateFormat.parse(Unknown Source)&lt;BR /&gt;at routines.TalendDate.parseDate(TalendDate.java:884)&lt;BR /&gt;... 5 more&lt;BR /&gt;[statistics] disconnected&lt;/P&gt;</description>
      <pubDate>Wed, 09 May 2018 08:15:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/String-to-date-conversion/m-p/2316410#M86957</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-05-09T08:15:08Z</dc:date>
    </item>
    <item>
      <title>Re: String to date conversion</title>
      <link>https://community.qlik.com/t5/Talend-Studio/String-to-date-conversion/m-p/2316411#M86958</link>
      <description>&lt;P&gt;Should be a new case...&lt;/P&gt;&lt;P&gt;Anyway, you may exclude records when the data content&amp;nbsp;lenght is less than 10 characters.&lt;/P&gt;&lt;P&gt;Use a tFilterRow for that.&lt;/P&gt;</description>
      <pubDate>Wed, 09 May 2018 08:30:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/String-to-date-conversion/m-p/2316411#M86958</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2018-05-09T08:30:10Z</dc:date>
    </item>
    <item>
      <title>Re: String to date conversion</title>
      <link>https://community.qlik.com/t5/Talend-Studio/String-to-date-conversion/m-p/2316412#M86959</link>
      <description>&lt;P&gt;i shoudn't drop records, because after this transmission those blank date fields will be having a data thru front end. I need to pass these blanks. Hence i did like below in tMap but it didnt work. Please suggest.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;row2.DiagnosisActivityStartDate == "" ? "" :&amp;nbsp; TalendDate.formatDate("MM-dd-yyyy",TalendDate.parseDate("yyyy-MM-dd",row2.DiagnosisActivityStartDate))&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 May 2018 09:16:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/String-to-date-conversion/m-p/2316412#M86959</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-05-09T09:16:15Z</dc:date>
    </item>
    <item>
      <title>Re: String to date conversion</title>
      <link>https://community.qlik.com/t5/Talend-Studio/String-to-date-conversion/m-p/2316413#M86960</link>
      <description>&lt;PRE&gt;"".equals(row2.DiagnosisActivityStartDate) ||&amp;nbsp;&lt;BR /&gt;row2.DiagnosisActivityStartDate == null ? "" : TalendDate.formatDate("MM-dd-yyyy",TalendDate.parseDate("yyyy-MM-dd",row2.DiagnosisActivityStartDate))&lt;/PRE&gt;</description>
      <pubDate>Wed, 09 May 2018 10:10:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/String-to-date-conversion/m-p/2316413#M86960</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2018-05-09T10:10:47Z</dc:date>
    </item>
    <item>
      <title>Re: String to date conversion</title>
      <link>https://community.qlik.com/t5/Talend-Studio/String-to-date-conversion/m-p/2316414#M86961</link>
      <description>&lt;P&gt;Wow TRF... it worked.. Thanks again&lt;/P&gt;</description>
      <pubDate>Wed, 09 May 2018 10:21:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/String-to-date-conversion/m-p/2316414#M86961</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-05-09T10:21:05Z</dc:date>
    </item>
    <item>
      <title>Re: String to date conversion</title>
      <link>https://community.qlik.com/t5/Talend-Studio/String-to-date-conversion/m-p/2316415#M86962</link>
      <description>&lt;P&gt;Hello TRF,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please explain the statement you have given for the solution?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;"".equals(row2.DiagnosisActivityStartDate) ||&amp;nbsp;&lt;BR /&gt;row2.DiagnosisActivityStartDate == null ? "" : TalendDate.formatDate("MM-dd-yyyy",TalendDate.parseDate("yyyy-MM-dd",row2.DiagnosisActivityStartDate))&lt;/PRE&gt;&lt;P&gt;It worked actually, but the output excel's cell is in "General" format and i am expecting in "Custom" format cell with MM-DD-YYYY option (just like the attached image) then only the formula will pick this cell for calculation. Please guide&lt;/P&gt;&lt;BR /&gt;&lt;A href="https://community.qlik.com/legacyfs/online/tlnd_dw_files/0683p000009LsYn"&gt;Graph9.jpg&lt;/A&gt;</description>
      <pubDate>Mon, 14 May 2018 07:32:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/String-to-date-conversion/m-p/2316415#M86962</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-05-14T07:32:26Z</dc:date>
    </item>
  </channel>
</rss>

