<?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 set context to current date? in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/set-context-to-current-date/m-p/2358865#M123804</link>
    <description>Hi &lt;BR /&gt;I am trying to set a string context variable to the current date&lt;BR /&gt;context.setProperty("run_date", TalendDate.getDate("YYYY-mm-dd"));&lt;BR /&gt;System.out.println( context.run_date);&lt;BR /&gt;but I get nothing returned?&lt;BR /&gt;Help?</description>
    <pubDate>Sat, 16 Nov 2024 13:34:08 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-11-16T13:34:08Z</dc:date>
    <item>
      <title>set context to current date?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/set-context-to-current-date/m-p/2358865#M123804</link>
      <description>Hi &lt;BR /&gt;I am trying to set a string context variable to the current date&lt;BR /&gt;context.setProperty("run_date", TalendDate.getDate("YYYY-mm-dd"));&lt;BR /&gt;System.out.println( context.run_date);&lt;BR /&gt;but I get nothing returned?&lt;BR /&gt;Help?</description>
      <pubDate>Sat, 16 Nov 2024 13:34:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/set-context-to-current-date/m-p/2358865#M123804</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T13:34:08Z</dc:date>
    </item>
    <item>
      <title>Re: set context to current date?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/set-context-to-current-date/m-p/2358866#M123805</link>
      <description>why not&lt;BR /&gt;context.run_date = TalendDate.getDate("YYYY-mm-dd");&lt;BR /&gt;?&lt;BR /&gt;or even &lt;BR /&gt;context.run_date.equals(TalendDate.getDate("YYYY-mm-dd");&lt;BR /&gt;?</description>
      <pubDate>Fri, 05 Feb 2010 20:22:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/set-context-to-current-date/m-p/2358866#M123805</guid>
      <dc:creator>jkrfs</dc:creator>
      <dc:date>2010-02-05T20:22:43Z</dc:date>
    </item>
    <item>
      <title>Re: set context to current date?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/set-context-to-current-date/m-p/2358867#M123806</link>
      <description>Hi,&lt;BR /&gt;Nope.&lt;BR /&gt;I am trying to set it in a tJava component at the start of the job. I have read other post and it says to use the setproperty function I just can't get it to work.&lt;BR /&gt;Thanks in advance for help.</description>
      <pubDate>Fri, 05 Feb 2010 20:28:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/set-context-to-current-date/m-p/2358867#M123806</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-02-05T20:28:22Z</dc:date>
    </item>
    <item>
      <title>Re: set context to current date?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/set-context-to-current-date/m-p/2358868#M123807</link>
      <description>Hi,&lt;BR /&gt;Yep. &lt;BR /&gt;I have multiple jobs right now that I set the current date in the tJava component at the beginning of the flow so that I can use it in later parts of the job.&lt;BR /&gt;Have you tried the method I suggested? Because like I said, it works for me. &lt;BR /&gt;Infact, I think if you want to format the date it has to be this way:&lt;BR /&gt;context.run_date = TalendDate.formatDate("yyyy-MM-dd",TalendDate.getCurrentDate());</description>
      <pubDate>Fri, 05 Feb 2010 21:26:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/set-context-to-current-date/m-p/2358868#M123807</guid>
      <dc:creator>jkrfs</dc:creator>
      <dc:date>2010-02-05T21:26:46Z</dc:date>
    </item>
    <item>
      <title>Re: set context to current date?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/set-context-to-current-date/m-p/2358869#M123808</link>
      <description>Hi,&lt;BR /&gt;Thanks that works - Must be a bad Friday for me.</description>
      <pubDate>Sat, 06 Feb 2010 00:29:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/set-context-to-current-date/m-p/2358869#M123808</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-02-06T00:29:10Z</dc:date>
    </item>
  </channel>
</rss>

