<?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 Context variables - can't select only the date (without its format) in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Context-variables-can-t-select-only-the-date-without-its-format/m-p/2210117#M8678</link>
    <description>Trying to select a date in the Context tab. Can?t just enter the date, must use the pop-up calendar. This brings in both the date and its format (yyyy-MM-dd;2011-02-22) which does not work when the context variable is used in a query.
&lt;BR /&gt;Workaround: Define the context variable as a string but in the Oracle date format: 
&lt;BR /&gt;?dd-MON-yyyy?, e.g., ?22-FEB-2011?
&lt;BR /&gt;Should I be doing something different in using the pop-up calendar?</description>
    <pubDate>Sat, 16 Nov 2024 13:04:26 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-11-16T13:04:26Z</dc:date>
    <item>
      <title>Context variables - can't select only the date (without its format)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Context-variables-can-t-select-only-the-date-without-its-format/m-p/2210117#M8678</link>
      <description>Trying to select a date in the Context tab. Can?t just enter the date, must use the pop-up calendar. This brings in both the date and its format (yyyy-MM-dd;2011-02-22) which does not work when the context variable is used in a query.
&lt;BR /&gt;Workaround: Define the context variable as a string but in the Oracle date format: 
&lt;BR /&gt;?dd-MON-yyyy?, e.g., ?22-FEB-2011?
&lt;BR /&gt;Should I be doing something different in using the pop-up calendar?</description>
      <pubDate>Sat, 16 Nov 2024 13:04:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Context-variables-can-t-select-only-the-date-without-its-format/m-p/2210117#M8678</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T13:04:26Z</dc:date>
    </item>
    <item>
      <title>Re: Context variables - can't select only the date (without its format)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Context-variables-can-t-select-only-the-date-without-its-format/m-p/2210118#M8679</link>
      <description>Hi 
&lt;BR /&gt;Define the context variable as a string, and then parse it to a Date with specify format, eg: 
&lt;BR /&gt;"select * from tableName where mydate="+TalendDate.parseDate("dd-MMM-yyyy", context.mydate) 
&lt;BR /&gt;Best regards 
&lt;BR /&gt;Shong</description>
      <pubDate>Fri, 25 Feb 2011 09:34:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Context-variables-can-t-select-only-the-date-without-its-format/m-p/2210118#M8679</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-02-25T09:34:13Z</dc:date>
    </item>
    <item>
      <title>Re: Context variables - can't select only the date (without its format)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Context-variables-can-t-select-only-the-date-without-its-format/m-p/2210119#M8680</link>
      <description>Thanks for the info -&lt;BR /&gt;Is this a bug?</description>
      <pubDate>Fri, 25 Feb 2011 12:14:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Context-variables-can-t-select-only-the-date-without-its-format/m-p/2210119#M8680</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-02-25T12:14:39Z</dc:date>
    </item>
    <item>
      <title>Re: Context variables - can't select only the date (without its format)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Context-variables-can-t-select-only-the-date-without-its-format/m-p/2210120#M8681</link>
      <description>Not much luck. Here are some errors. The query is in a tOracleInput comonent. The context.TheDate is 'dd-Mon-yyyy' format, including the quotes. 
&lt;BR /&gt;
&lt;BR /&gt;SELECT *
&lt;BR /&gt;FROM table
&lt;BR /&gt;WHERE Table.LAST_MOD_DATE 
&lt;BR /&gt;&amp;gt;"+TalendDate.parseDate("dd-MMM-yyyy",context.TheDate)
&lt;BR /&gt;statistics] connecting to socket on port 3459
&lt;BR /&gt; connected
&lt;BR /&gt;Exception in component tOracleInput_2
&lt;BR /&gt;java.sql.SQLException: ORA-00933: SQL command not properly ended
&lt;BR /&gt;=================================
&lt;BR /&gt;SELECT *
&lt;BR /&gt;FROM table
&lt;BR /&gt;WHERE Table.LAST_MOD_DATE 
&lt;BR /&gt;&amp;gt; '"+TalendDate.parseDate("dd-MMM-yyyy",context.TheDate)+"'"
&lt;BR /&gt;Exception in component tOracleInput_2
&lt;BR /&gt;java.sql.SQLException: ORA-01858: a non-numeric character was found where a numeric was expected
&lt;BR /&gt; at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
&lt;BR /&gt; at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
&lt;BR /&gt; at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
&lt;BR /&gt; at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:745)</description>
      <pubDate>Fri, 25 Feb 2011 16:06:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Context-variables-can-t-select-only-the-date-without-its-format/m-p/2210120#M8681</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-02-25T16:06:44Z</dc:date>
    </item>
    <item>
      <title>Re: Context variables - can't select only the date (without its format)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Context-variables-can-t-select-only-the-date-without-its-format/m-p/2210121#M8682</link>
      <description>print your query to the console in a tJava to debug. Chances are you dont have the format exactly right.</description>
      <pubDate>Fri, 25 Feb 2011 16:35:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Context-variables-can-t-select-only-the-date-without-its-format/m-p/2210121#M8682</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-02-25T16:35:35Z</dc:date>
    </item>
    <item>
      <title>Re: Context variables - can't select only the date (without its format)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Context-variables-can-t-select-only-the-date-without-its-format/m-p/2210122#M8683</link>
      <description>If you're using the "date" as part of a SQL statement, it should be a string not a date i.e.
&lt;BR /&gt;- if your context variable is a string (in the correct format): "SELECT * FROM table WHERE Table.LAST_MOD_DATE&amp;gt;'"+context.TheDate+"'"
&lt;BR /&gt;- if your context variable is a date: "SELECT * FROM table WHERE Table.LAST_MOD_DATE &amp;gt;'"+TalendDate.formatDate("dd-MMM-yyyy",context.TheDate)+"'"
&lt;BR /&gt;In both cases, don't forget the '' date-delimiters for Oracle.</description>
      <pubDate>Fri, 04 Mar 2011 04:51:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Context-variables-can-t-select-only-the-date-without-its-format/m-p/2210122#M8683</guid>
      <dc:creator>alevy</dc:creator>
      <dc:date>2011-03-04T04:51:39Z</dc:date>
    </item>
    <item>
      <title>Re: Context variables - can't select only the date (without its format)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Context-variables-can-t-select-only-the-date-without-its-format/m-p/2210123#M8684</link>
      <description>Thanks, alevy.  Your context variable date version is just what we were looking for.  We recognized the SQL string need a date in the form of a string, but wanted the flexibility of setting the context variable using a calendar popup.&lt;BR /&gt;It seems date/time pattern in the context variable screens serve no purpose.  When I looked at the context variable in the SQL string Talend created I get:&lt;BR /&gt;&amp;lt;context variable = "Wed, 9 Mar 2011 12:08:56 -0700" &lt;BR /&gt;regardless of what format string was provided.  But formatting the date via the TalendDate.formatDate() method works.</description>
      <pubDate>Wed, 09 Mar 2011 18:42:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Context-variables-can-t-select-only-the-date-without-its-format/m-p/2210123#M8684</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-03-09T18:42:32Z</dc:date>
    </item>
    <item>
      <title>Re: Context variables - can't select only the date (without its format)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Context-variables-can-t-select-only-the-date-without-its-format/m-p/2210124#M8685</link>
      <description>I believe the pattern only becomes relevant when you try to use tContextLoad or tContextDump - the string is parsed or formatted (respectively) using the pattern defined with the default value. This is basically the same principle as for schema dates i.e. the pattern is a mask only. 
&lt;BR /&gt;There are some issues with context date patterns - see 
&lt;A href="https://community.qlik.com/s/feed/0D53p00007vCpIhCAK" rel="nofollow noopener noreferrer"&gt;https://community.talend.com/t5/Design-and-Development/how-to-give-column-names-through-context/td-p/101085&lt;/A&gt;.</description>
      <pubDate>Wed, 09 Mar 2011 23:14:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Context-variables-can-t-select-only-the-date-without-its-format/m-p/2210124#M8685</guid>
      <dc:creator>alevy</dc:creator>
      <dc:date>2011-03-09T23:14:44Z</dc:date>
    </item>
  </channel>
</rss>

