<?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: Error while comparing TalendDate with database date column in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Error-while-comparing-TalendDate-with-database-date-column/m-p/2284464#M58148</link>
    <description>Ok. I have a tsetglobalvar whose value is var =&amp;nbsp;TalendDate.getDate("YYYY-MM-dd HH:mm:ss:mmm").&lt;BR /&gt;Now I need to pass this to tmssqlinput. How do I do this? The query in tmssqlinput is "select * from function("+globalMap.var+)"&lt;BR /&gt;I am trying to pass with cast and convert, but still keeps giving syntax error&lt;BR /&gt;Thanks&lt;BR /&gt;Rathi</description>
    <pubDate>Wed, 08 Mar 2017 13:49:47 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-03-08T13:49:47Z</dc:date>
    <item>
      <title>Error while comparing TalendDate with database date column</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Error-while-comparing-TalendDate-with-database-date-column/m-p/2284458#M58142</link>
      <description>Hi,&lt;BR /&gt;I have my database date columns storing datetime in the format 'YYYY-MM-DD HH:mi:ss:mmm'&lt;BR /&gt;I want the talend current date to be returned in this format. So , I used this TalendDate.formatDate("YYYY-mm-dd HH:mm:ss",TalendDate.parseDate("YYYY-mm-dd HH:mm:ss",TalendDate.getDate("YYYY-mm-dd HH:mm:ss")))&lt;BR /&gt;The problem is this is converting it to string. Also, I keep getting the error 'Incorrect syntax' when I pass the above to sql. And hence I cannot compare with date column of the database.&lt;BR /&gt;Am using sql server&lt;BR /&gt;Any thougths on this?&lt;BR /&gt;Thanks&lt;BR /&gt;Rathi</description>
      <pubDate>Wed, 08 Mar 2017 07:45:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Error-while-comparing-TalendDate-with-database-date-column/m-p/2284458#M58142</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-03-08T07:45:56Z</dc:date>
    </item>
    <item>
      <title>Re: Error while comparing TalendDate with database date column</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Error-while-comparing-TalendDate-with-database-date-column/m-p/2284459#M58143</link>
      <description>Hi,&lt;BR /&gt;Get the current Talend date using this syntax:&lt;BR /&gt;&lt;PRE&gt;TalendDate.formatDate("yyyy-MM-dd HH:mm:ss:SSS",TalendDate.getCurrentDate())&lt;/PRE&gt;&lt;BR /&gt;Get the date from SQL Server using this syntax in your SQL query:&lt;BR /&gt;&lt;PRE&gt;CONVERT(VARCHAR(24), yourColumnDate, 121)&lt;/PRE&gt;&lt;BR /&gt;Check the result on the SQL Server before (I'm not sure for this point).&lt;BR /&gt;Now you have 2 strings you can compare.&lt;BR /&gt;Hope this helps.&lt;BR /&gt;TRF</description>
      <pubDate>Wed, 08 Mar 2017 10:14:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Error-while-comparing-TalendDate-with-database-date-column/m-p/2284459#M58143</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2017-03-08T10:14:20Z</dc:date>
    </item>
    <item>
      <title>Re: Error while comparing TalendDate with database date column</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Error-while-comparing-TalendDate-with-database-date-column/m-p/2284460#M58144</link>
      <description>Hi TRF, thanks for the response&lt;BR /&gt;I need to compare the dates. &amp;gt;= , &amp;lt;= etc. With strings I would not be able to achieve this. Is there any way to do this?&lt;BR /&gt;Thanks&lt;BR /&gt;Rathi</description>
      <pubDate>Wed, 08 Mar 2017 10:17:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Error-while-comparing-TalendDate-with-database-date-column/m-p/2284460#M58144</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-03-08T10:17:46Z</dc:date>
    </item>
    <item>
      <title>Re: Error while comparing TalendDate with database date column</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Error-while-comparing-TalendDate-with-database-date-column/m-p/2284461#M58145</link>
      <description>&lt;PRE&gt;row1.yourTalendDate.compareTo(row2.yourSqlDate)&lt;BR /&gt;// return 0, &amp;lt; 0 or &amp;gt; 0 depending of the comparison result&lt;/PRE&gt;</description>
      <pubDate>Wed, 08 Mar 2017 10:44:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Error-while-comparing-TalendDate-with-database-date-column/m-p/2284461#M58145</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2017-03-08T10:44:43Z</dc:date>
    </item>
    <item>
      <title>Re: Error while comparing TalendDate with database date column</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Error-while-comparing-TalendDate-with-database-date-column/m-p/2284462#M58146</link>
      <description>Thanks TRF. That will work.
&lt;BR /&gt;I have to pass the talendate as a parameter to a function. The function in sql server only understands data as date. How do I do this?</description>
      <pubDate>Wed, 08 Mar 2017 10:57:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Error-while-comparing-TalendDate-with-database-date-column/m-p/2284462#M58146</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-03-08T10:57:01Z</dc:date>
    </item>
    <item>
      <title>Re: Error while comparing TalendDate with database date column</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Error-while-comparing-TalendDate-with-database-date-column/m-p/2284463#M58147</link>
      <description>Try "CAST" when calling the SQL function.</description>
      <pubDate>Wed, 08 Mar 2017 11:08:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Error-while-comparing-TalendDate-with-database-date-column/m-p/2284463#M58147</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2017-03-08T11:08:23Z</dc:date>
    </item>
    <item>
      <title>Re: Error while comparing TalendDate with database date column</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Error-while-comparing-TalendDate-with-database-date-column/m-p/2284464#M58148</link>
      <description>Ok. I have a tsetglobalvar whose value is var =&amp;nbsp;TalendDate.getDate("YYYY-MM-dd HH:mm:ss:mmm").&lt;BR /&gt;Now I need to pass this to tmssqlinput. How do I do this? The query in tmssqlinput is "select * from function("+globalMap.var+)"&lt;BR /&gt;I am trying to pass with cast and convert, but still keeps giving syntax error&lt;BR /&gt;Thanks&lt;BR /&gt;Rathi</description>
      <pubDate>Wed, 08 Mar 2017 13:49:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Error-while-comparing-TalendDate-with-database-date-column/m-p/2284464#M58148</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-03-08T13:49:47Z</dc:date>
    </item>
  </channel>
</rss>

