<?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: Pass context variable in tMap in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Pass-context-variable-in-tMap/m-p/2285026#M58648</link>
    <description>&lt;P&gt;It sounds like you were nearly there with.....&lt;/P&gt;&lt;PRE&gt;TalendDate.parsedate("DD-MMM-YYYY", "context.BusinessDate")&lt;/PRE&gt;&lt;P&gt;The problem you have is that you have is that you are actually supplying context.BusinessDate as a literal String. Try the code below.....&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;TalendDate.parseDate("dd-MMM-yyyy", context.BusinessDate)&lt;/PRE&gt;&lt;P&gt;Also beware of using the incorrect case (upper or lower) for the format and the method call. I have changed yours to what I believe it should be&lt;/P&gt;</description>
    <pubDate>Mon, 19 Jun 2017 12:00:37 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-06-19T12:00:37Z</dc:date>
    <item>
      <title>Pass context variable in tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Pass-context-variable-in-tMap/m-p/2285025#M58647</link>
      <description>&lt;P&gt;I have a job, where I have set a context variable named as "BusinessDate" of Type String, Value: 31-MAY-2017. I need to use this variable to set one of the columns in a table.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My job is InputDelimited --&amp;gt; tMap --&amp;gt; Oracle load&lt;/P&gt;
&lt;P&gt;In tMap, I am creating a new column MAT_DT of type Date &amp;amp; setting the value as "+context.BusinessDate+", but the job is throwing a error "&amp;nbsp;Type mismatch: cannot convert from String to Date". If I use the function 'TalendDate.parsedate("DD-MMM-YYYY", "context.BusinessDate")', still its failing. How do I convert the context variable which is set as String to Date in tMap.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jun 2017 11:59:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Pass-context-variable-in-tMap/m-p/2285025#M58647</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-19T11:59:37Z</dc:date>
    </item>
    <item>
      <title>Re: Pass context variable in tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Pass-context-variable-in-tMap/m-p/2285026#M58648</link>
      <description>&lt;P&gt;It sounds like you were nearly there with.....&lt;/P&gt;&lt;PRE&gt;TalendDate.parsedate("DD-MMM-YYYY", "context.BusinessDate")&lt;/PRE&gt;&lt;P&gt;The problem you have is that you have is that you are actually supplying context.BusinessDate as a literal String. Try the code below.....&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;TalendDate.parseDate("dd-MMM-yyyy", context.BusinessDate)&lt;/PRE&gt;&lt;P&gt;Also beware of using the incorrect case (upper or lower) for the format and the method call. I have changed yours to what I believe it should be&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jun 2017 12:00:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Pass-context-variable-in-tMap/m-p/2285026#M58648</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-19T12:00:37Z</dc:date>
    </item>
  </channel>
</rss>

