<?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 Type Mismatch - Cannot covert String to Date in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Type-Mismatch-Cannot-covert-String-to-Date/m-p/2377829#M139640</link>
    <description>&lt;P&gt;I am trying to get system generated current date and push into a target table column (Please note - date is not coming from source but created a part of expression in tMap)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am able to understand the error and hypothetically know its solution, but nothing seems to work. the target table accept date in DATE datatype. however, below expression in Talend creates date in string DATATYPE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TalendDate.formatDate("MM-dd-yyyy",TalendDate.getCurrentDate())&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as you see below, it gives error, however when i test, it gives proper date. I have also used several flavors of TalendDate.parseDate("MM-dd-yyyy",[fed the above expression here] but this too didnt work.)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000N3lFkAAJ.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/136116i77A0DB9B857D7473/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000N3lFkAAJ.png" alt="0695b00000N3lFkAAJ.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000N3lFpAAJ.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/133445i1B5396CB9D3CD996/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000N3lFpAAJ.png" alt="0695b00000N3lFpAAJ.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 15 Nov 2024 23:15:37 GMT</pubDate>
    <dc:creator>Ankit_DS</dc:creator>
    <dc:date>2024-11-15T23:15:37Z</dc:date>
    <item>
      <title>Type Mismatch - Cannot covert String to Date</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Type-Mismatch-Cannot-covert-String-to-Date/m-p/2377829#M139640</link>
      <description>&lt;P&gt;I am trying to get system generated current date and push into a target table column (Please note - date is not coming from source but created a part of expression in tMap)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am able to understand the error and hypothetically know its solution, but nothing seems to work. the target table accept date in DATE datatype. however, below expression in Talend creates date in string DATATYPE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TalendDate.formatDate("MM-dd-yyyy",TalendDate.getCurrentDate())&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as you see below, it gives error, however when i test, it gives proper date. I have also used several flavors of TalendDate.parseDate("MM-dd-yyyy",[fed the above expression here] but this too didnt work.)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000N3lFkAAJ.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/136116i77A0DB9B857D7473/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000N3lFkAAJ.png" alt="0695b00000N3lFkAAJ.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000N3lFpAAJ.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/133445i1B5396CB9D3CD996/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000N3lFpAAJ.png" alt="0695b00000N3lFpAAJ.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 23:15:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Type-Mismatch-Cannot-covert-String-to-Date/m-p/2377829#M139640</guid>
      <dc:creator>Ankit_DS</dc:creator>
      <dc:date>2024-11-15T23:15:37Z</dc:date>
    </item>
    <item>
      <title>Re: Type Mismatch - Cannot covert String to Date</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Type-Mismatch-Cannot-covert-String-to-Date/m-p/2377830#M139641</link>
      <description>&lt;P&gt;Hi, TalendDate.formatDate return a String and you want a Date. So just use TalendDate.getCurrentDate() wich return a DATE&lt;/P&gt;&lt;P&gt;or if you want a specific date use for  eg : TalendDate.parseDate("dd-MM-yyyy","31-01-2022")&lt;/P&gt;&lt;P&gt;Send me love and kudos&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jan 2022 08:03:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Type-Mismatch-Cannot-covert-String-to-Date/m-p/2377830#M139641</guid>
      <dc:creator>gjeremy1617088143</dc:creator>
      <dc:date>2022-01-31T08:03:41Z</dc:date>
    </item>
    <item>
      <title>Re: Type Mismatch - Cannot covert String to Date</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Type-Mismatch-Cannot-covert-String-to-Date/m-p/2377831#M139642</link>
      <description>&lt;P&gt;@guenneguez jeremy​&amp;nbsp;both these commands dont give date in date datatype. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TalendDate.getCurrentDate()  --&amp;gt; gives result in string data type.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TalendDate.parseDate("dd-MM-yyyy",TalendDate.getCurrentDate()) --&amp;gt; this too didn't work.&lt;/P&gt;</description>
      <pubDate>Sun, 06 Feb 2022 04:03:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Type-Mismatch-Cannot-covert-String-to-Date/m-p/2377831#M139642</guid>
      <dc:creator>Ankit_DS</dc:creator>
      <dc:date>2022-02-06T04:03:16Z</dc:date>
    </item>
    <item>
      <title>Re: Type Mismatch - Cannot covert String to Date</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Type-Mismatch-Cannot-covert-String-to-Date/m-p/2377832#M139643</link>
      <description>&lt;P&gt;I am posting the answer myself, problem was, when i was Testing the currentDate function as shown below, it was giving me String format as (SunFeb 06 19:51 EST...), however i just ignored it and went away by writing it in SQLServer target column, and the map ran fine, and  in the target table date was showing fine in dd-MM-yyyy format,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000O9wXWAAZ.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154809iA27E0B82B550753E/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000O9wXWAAZ.png" alt="0695b00000O9wXWAAZ.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;beware, the format date function, shows the date in dd-MM-yyyy format, but thats actually string and it won't work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000O9wbOAAR.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/129265i24E18CCC9EF8E20F/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000O9wbOAAR.png" alt="0695b00000O9wbOAAR.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Feb 2022 00:57:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Type-Mismatch-Cannot-covert-String-to-Date/m-p/2377832#M139643</guid>
      <dc:creator>Ankit_DS</dc:creator>
      <dc:date>2022-02-07T00:57:11Z</dc:date>
    </item>
    <item>
      <title>Re: Type Mismatch - Cannot covert String to Date</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Type-Mismatch-Cannot-covert-String-to-Date/m-p/2377833#M139644</link>
      <description>&lt;P&gt;TalendDate.getCurrentDate() return date,&lt;/P&gt;&lt;P&gt;TalendDate.parseDate("dd-MM-yyyy","31-01-2022") return date,&lt;/P&gt;&lt;P&gt;TalendDate.formatDate("dd-MM-yyyy",TalendDate.getCurrentDate()) return String&lt;/P&gt;</description>
      <pubDate>Mon, 07 Feb 2022 08:12:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Type-Mismatch-Cannot-covert-String-to-Date/m-p/2377833#M139644</guid>
      <dc:creator>gjeremy1617088143</dc:creator>
      <dc:date>2022-02-07T08:12:07Z</dc:date>
    </item>
  </channel>
</rss>

