<?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: Parse date from globalMap in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Parse-date-from-globalMap/m-p/2211187#M9315</link>
    <description>Hi,&lt;BR /&gt;Think of SQL query as a String. So, you don't have to convert tMsgBox_2_Result to a Date, just compose the String as if you've type it by yourself:&lt;BR /&gt;&lt;PRE&gt;"par.data &amp;gt; '" +&amp;nbsp;(String)globalMap.get("tMsgBox_2_RESULT") + &lt;BR /&gt;"' and par.data &amp;lt; '30-11-2015' and cli.razon like '" + &lt;BR /&gt;(String)globalMap.get("&lt;FONT size="2"&gt;tMsgBox_2_RESULT") + "%'"&lt;/FONT&gt;&lt;/PRE&gt;&lt;BR /&gt;Hope this helps,&lt;BR /&gt;TRF</description>
    <pubDate>Mon, 30 Jan 2017 11:40:05 GMT</pubDate>
    <dc:creator>TRF</dc:creator>
    <dc:date>2017-01-30T11:40:05Z</dc:date>
    <item>
      <title>Parse date from globalMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Parse-date-from-globalMap/m-p/2211186#M9314</link>
      <description>Hi!
&lt;BR /&gt;I am using a sql query with parameters. I am getting those parameters with the component tMsgBox as a globalvar.&amp;nbsp;
&lt;BR /&gt;This is a part from the query with mssqlinput:
&lt;BR /&gt;par.data &amp;gt; 
&lt;FONT color="#ff3333"&gt;TalendDate.formatDate("dd-MM-yyyy", (String)globalMap.get("tMsgBox_2_RESULT"))&lt;/FONT&gt; &amp;nbsp;and par.data &amp;lt; '30-11-2015' and 
&lt;B&gt;&lt;FONT color="#3366ff"&gt;cli.razon like '"+(String)globalMap.get("tMsgBox_1_RESULT")+"%'&lt;/FONT&gt;&lt;/B&gt;
&lt;BR /&gt;
&lt;BR /&gt;On the blue code, I can compare the parameter from the tmsgbox without problem because it's a string, but when I want to input a date with the format "dd-mm-yyyy" talend is giving me an error all the time. I just want to convert that string to a date, in order to compare this on the sql.</description>
      <pubDate>Mon, 30 Jan 2017 11:19:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Parse-date-from-globalMap/m-p/2211186#M9314</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-01-30T11:19:35Z</dc:date>
    </item>
    <item>
      <title>Re: Parse date from globalMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Parse-date-from-globalMap/m-p/2211187#M9315</link>
      <description>Hi,&lt;BR /&gt;Think of SQL query as a String. So, you don't have to convert tMsgBox_2_Result to a Date, just compose the String as if you've type it by yourself:&lt;BR /&gt;&lt;PRE&gt;"par.data &amp;gt; '" +&amp;nbsp;(String)globalMap.get("tMsgBox_2_RESULT") + &lt;BR /&gt;"' and par.data &amp;lt; '30-11-2015' and cli.razon like '" + &lt;BR /&gt;(String)globalMap.get("&lt;FONT size="2"&gt;tMsgBox_2_RESULT") + "%'"&lt;/FONT&gt;&lt;/PRE&gt;&lt;BR /&gt;Hope this helps,&lt;BR /&gt;TRF</description>
      <pubDate>Mon, 30 Jan 2017 11:40:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Parse-date-from-globalMap/m-p/2211187#M9315</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2017-01-30T11:40:05Z</dc:date>
    </item>
    <item>
      <title>Re: Parse date from globalMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Parse-date-from-globalMap/m-p/2211188#M9316</link>
      <description>Helps a lot. Thank you.</description>
      <pubDate>Mon, 30 Jan 2017 11:59:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Parse-date-from-globalMap/m-p/2211188#M9316</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-01-30T11:59:42Z</dc:date>
    </item>
    <item>
      <title>Re: Parse date from globalMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Parse-date-from-globalMap/m-p/2211189#M9317</link>
      <description>&lt;P&gt;it is not working for me,  below is the error snippet&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;tDBInput_5 class java.sql.Timestamp cannot be cast to class java.lang.String (java.sql.Timestamp is in module java.sql of loader 'platform'; java.lang.String is in module java.base of loader 'bootstrap')&lt;/P&gt;&lt;P&gt;java.lang.ClassCastException: class java.sql.Timestamp cannot be cast to class java.lang.String (java.sql.Timestamp is in module java.sql of loader 'platform'; java.lang.String is in module java.base of loader 'bootstrap')&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2023 04:33:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Parse-date-from-globalMap/m-p/2211189#M9317</guid>
      <dc:creator>KarthikGs</dc:creator>
      <dc:date>2023-03-08T04:33:56Z</dc:date>
    </item>
  </channel>
</rss>

