<?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: Date Format in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Date-Format/m-p/2209067#M8047</link>
    <description>&lt;P&gt;to_DATE is working. Actually I tried that earlier but because of some syntax error, it was not working.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank You So much.&lt;/P&gt;&lt;P&gt;Sonali&lt;/P&gt;</description>
    <pubDate>Fri, 21 Sep 2018 09:32:29 GMT</pubDate>
    <dc:creator>sonalijagtap</dc:creator>
    <dc:date>2018-09-21T09:32:29Z</dc:date>
    <item>
      <title>Date Format</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Date-Format/m-p/2209060#M8040</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a context variable(ClaimDate) of type Date.&lt;/P&gt;&lt;P&gt;Whenever I am setting default value of&amp;nbsp;&lt;SPAN&gt;ClaimDate in Context tab as '2018-02-22', it will throw an error at runtime as value is null.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;but when I pass the value as&amp;nbsp;'2018-09-20 hh:mm:ss', It is working. but prining the value like&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thu Sep 20 00:00:00 IST 2018&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;But I want the value of that variable as '2018-09-20'. I tried to convert using&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;context.ReClaimDate=TalendDate.parseDate("yyyy-MM-dd", TalendDate.formatDate("yyyy-MM-dd HH:mm:ss", context.ReClaimDate))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;but it is still giving the same output&amp;nbsp; "Thu Sep 20 00:00:00 IST 2018"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Please help on priority.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank You,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Sonali Jagtap&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Sep 2018 07:59:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Date-Format/m-p/2209060#M8040</guid>
      <dc:creator>sonalijagtap</dc:creator>
      <dc:date>2018-09-21T07:59:40Z</dc:date>
    </item>
    <item>
      <title>Re: Date Format</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Date-Format/m-p/2209061#M8041</link>
      <description>Date are stored as java Date Type.&lt;BR /&gt;if you want to display or to retrieve it, using your own format, you have to convert it to String using TalendDate.formatDate(xxx,xxx)</description>
      <pubDate>Fri, 21 Sep 2018 08:06:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Date-Format/m-p/2209061#M8041</guid>
      <dc:creator>fdenis</dc:creator>
      <dc:date>2018-09-21T08:06:22Z</dc:date>
    </item>
    <item>
      <title>Re: Date Format</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Date-Format/m-p/2209062#M8042</link>
      <description>&lt;P&gt;But I need that date further in Redshift query like&amp;nbsp;&lt;/P&gt;&lt;P&gt;Select * from Table where cal_date&amp;lt;context.claimDate&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;here Cal_date is of Date type with the format 'yyyy-mm-dd'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;how to achive this if I convert the date to String as per your suggestion?&lt;/P&gt;</description>
      <pubDate>Fri, 21 Sep 2018 08:12:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Date-Format/m-p/2209062#M8042</guid>
      <dc:creator>sonalijagtap</dc:creator>
      <dc:date>2018-09-21T08:12:26Z</dc:date>
    </item>
    <item>
      <title>Re: Date Format</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Date-Format/m-p/2209063#M8043</link>
      <description>your query must be like&lt;BR /&gt;"Select * from Table where cal_date&amp;lt;'" + TalendDate.formatDate("yyyy-MM-dd", context.ReClaimDate)) +"'"&lt;BR /&gt;</description>
      <pubDate>Fri, 21 Sep 2018 08:25:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Date-Format/m-p/2209063#M8043</guid>
      <dc:creator>fdenis</dc:creator>
      <dc:date>2018-09-21T08:25:03Z</dc:date>
    </item>
    <item>
      <title>Re: Date Format</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Date-Format/m-p/2209064#M8044</link>
      <description>&lt;P&gt;&lt;SPAN&gt;TalendDate.formatDate() will return the String type value. my cal_dt is date type.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I tried using below query because parseDate will convert the value from String to date. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"SELECT&amp;nbsp;* FROM&amp;nbsp;table&lt;BR /&gt;WHERE CAL_DT= '" + TalendDate.parseDate("yyyy-MM-dd", TalendDate.formatDate("yyyy-MM-dd HH:mm:ss", context.ReClaim_date)) +"'"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;But I am not getting data from table because&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;TalendDate.parseDate("yyyy-MM-dd", TalendDate.formatDate("yyyy-MM-dd HH:mm:ss", context.ReClaim_date)) i&lt;/EM&gt;s returning the date in the format&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Wed Dec 06 00:00:00 UTC 2017&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Expected Output is: 2017-12-06 not the above highlighted&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Sep 2018 09:06:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Date-Format/m-p/2209064#M8044</guid>
      <dc:creator>sonalijagtap</dc:creator>
      <dc:date>2018-09-21T09:06:16Z</dc:date>
    </item>
    <item>
      <title>Re: Date Format</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Date-Format/m-p/2209065#M8045</link>
      <description>SQL query is String.
&lt;BR /&gt;your database engine is going to analysing your query.
&lt;BR /&gt;Then it is going to convert String to Date.
&lt;BR /&gt;remove paseDate.
&lt;BR /&gt;</description>
      <pubDate>Fri, 21 Sep 2018 09:13:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Date-Format/m-p/2209065#M8045</guid>
      <dc:creator>fdenis</dc:creator>
      <dc:date>2018-09-21T09:13:46Z</dc:date>
    </item>
    <item>
      <title>Re: Date Format</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Date-Format/m-p/2209066#M8046</link>
      <description>&lt;P&gt;As for many database engines, try to use "&lt;SPAN&gt;TO_DATE (&lt;/SPAN&gt;&lt;EM&gt;string&lt;/EM&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;EM&gt;format&lt;/EM&gt;&lt;SPAN&gt;)" function.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;From my point of view, the easiest solution is to declare the context variable as a String then pass it to TO_DATE in the WHERE clause:&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;"Select * from Table where cal_date &amp;lt; TO_DATE('" + context.ReClaimDate + "', 'YYYY-MM-dd')"&lt;/PRE&gt;</description>
      <pubDate>Fri, 21 Sep 2018 09:16:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Date-Format/m-p/2209066#M8046</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2018-09-21T09:16:21Z</dc:date>
    </item>
    <item>
      <title>Re: Date Format</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Date-Format/m-p/2209067#M8047</link>
      <description>&lt;P&gt;to_DATE is working. Actually I tried that earlier but because of some syntax error, it was not working.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank You So much.&lt;/P&gt;&lt;P&gt;Sonali&lt;/P&gt;</description>
      <pubDate>Fri, 21 Sep 2018 09:32:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Date-Format/m-p/2209067#M8047</guid>
      <dc:creator>sonalijagtap</dc:creator>
      <dc:date>2018-09-21T09:32:29Z</dc:date>
    </item>
  </channel>
</rss>

