<?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 How to convert date to string in the SOQL query in tSalesforceinput component? in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/How-to-convert-date-to-string-in-the-SOQL-query-in/m-p/2273078#M50166</link>
    <description>&lt;P&gt;We are using tSalesforceinput component and writing a following query to extract data from it.&lt;/P&gt;
&lt;P&gt;"SELECT Name,CreatedDate,CreatedById,LastModifiedDate FROM Finance__c WHERE &lt;STRONG&gt;LastModifiedDate&lt;/STRONG&gt; &amp;gt;= '"+context.GlobalExtDT+"'"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Context variable called&amp;nbsp;GlobalExtDT is in a &lt;STRONG&gt;string&lt;/STRONG&gt; format&lt;/P&gt;
&lt;P&gt;How to convert&amp;nbsp;LastModifiedDate from date type to string type in the SOQL query to compare?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 06:02:02 GMT</pubDate>
    <dc:creator>rp2018</dc:creator>
    <dc:date>2024-11-16T06:02:02Z</dc:date>
    <item>
      <title>How to convert date to string in the SOQL query in tSalesforceinput component?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-convert-date-to-string-in-the-SOQL-query-in/m-p/2273078#M50166</link>
      <description>&lt;P&gt;We are using tSalesforceinput component and writing a following query to extract data from it.&lt;/P&gt;
&lt;P&gt;"SELECT Name,CreatedDate,CreatedById,LastModifiedDate FROM Finance__c WHERE &lt;STRONG&gt;LastModifiedDate&lt;/STRONG&gt; &amp;gt;= '"+context.GlobalExtDT+"'"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Context variable called&amp;nbsp;GlobalExtDT is in a &lt;STRONG&gt;string&lt;/STRONG&gt; format&lt;/P&gt;
&lt;P&gt;How to convert&amp;nbsp;LastModifiedDate from date type to string type in the SOQL query to compare?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 06:02:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-convert-date-to-string-in-the-SOQL-query-in/m-p/2273078#M50166</guid>
      <dc:creator>rp2018</dc:creator>
      <dc:date>2024-11-16T06:02:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert date to string in the SOQL query in tSalesforceinput component?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-convert-date-to-string-in-the-SOQL-query-in/m-p/2273079#M50167</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Please refer below posts from Salesforce forums.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://developer.salesforce.com/forums/?id=906F00000009QXpIAM" target="_blank" rel="nofollow noopener noreferrer"&gt;https://developer.salesforce.com/forums/?id=906F00000009QXpIAM&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://developer.salesforce.com/forums/?id=906F0000000AkNiIAK" target="_blank" rel="nofollow noopener noreferrer"&gt;https://developer.salesforce.com/forums/?id=906F0000000AkNiIAK&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://developer.salesforce.com/forums/?id=906F000000096TdIAI" target="_blank" rel="nofollow noopener noreferrer"&gt;https://developer.salesforce.com/forums/?id=906F000000096TdIAI&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Warm Regards,&lt;BR /&gt;Nikhil Thampi&lt;/P&gt;
&lt;P&gt;Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Apr 2019 19:40:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-convert-date-to-string-in-the-SOQL-query-in/m-p/2273079#M50167</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-04-22T19:40:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert date to string in the SOQL query in tSalesforceinput component?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-convert-date-to-string-in-the-SOQL-query-in/m-p/2273080#M50168</link>
      <description>&lt;P&gt;The three posts did not help me resolve my issue.&amp;nbsp; Anyway to convert the string context.GlobalExtDT to the date type?&amp;nbsp; This will resolve my issue when comparing in SOQL.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So far this is what I've done.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. Created a context variable called GlobalCvtDate as Date format&lt;/P&gt;&lt;P&gt;2.&amp;nbsp; context.GlobalExtDT =&amp;nbsp; "2019-02-14 19:23:50.000"; --NOTE:&amp;nbsp; This value is coming from a parent job.&lt;/P&gt;&lt;P&gt;3.&amp;nbsp; in tJava:&lt;/P&gt;&lt;P&gt;context.GlobalCvtDate = TalendDate.parseDate("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",context.GlobalExtDT);&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NOTE:&amp;nbsp; I'm getting&amp;nbsp;Thu Feb 14 19:23:50 CST 2019 --&amp;gt; This value is not taken by SOQL.&amp;nbsp; Any way&lt;/P&gt;&lt;P&gt;to get exact value "2019-02-14 19:23:50.000" as a date format?&lt;/P&gt;</description>
      <pubDate>Mon, 22 Apr 2019 20:56:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-convert-date-to-string-in-the-SOQL-query-in/m-p/2273080#M50168</guid>
      <dc:creator>rp2018</dc:creator>
      <dc:date>2019-04-22T20:56:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert date to string in the SOQL query in tSalesforceinput component?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-convert-date-to-string-in-the-SOQL-query-in/m-p/2273081#M50169</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/0053p000007LOUoAAO"&gt;@rp2018&lt;/A&gt;&amp;nbsp;, I will suggest you below way.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;1) In a parent job convert date to string and load into context and pass it to subjob.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;2) and read the query below way&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;"SELECT Name,CreatedDate,CreatedById,LastModifiedDate FROM Finance__c WHERE&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;LastModifiedDate&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&amp;gt;="+ context.GlobalExtDT&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2019 05:03:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-convert-date-to-string-in-the-SOQL-query-in/m-p/2273081#M50169</guid>
      <dc:creator>manodwhb</dc:creator>
      <dc:date>2019-04-23T05:03:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert date to string in the SOQL query in tSalesforceinput component?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-convert-date-to-string-in-the-SOQL-query-in/m-p/2273082#M50170</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp; &amp;nbsp; The Salesforce forums says that you need to feed the date value as string. So you will have to parse the date value in the format expected by Salesforce and the SOQL will take it from there.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;If you want to format a date to String in any specific format, please use formatDate function under tMap as shown below.&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="image.png" style="width: 859px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M4l3.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/130424iACD71460C61AE7E4/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M4l3.png" alt="0683p000009M4l3.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Warm Regards,&lt;BR /&gt;Nikhil Thampi&lt;/P&gt; 
&lt;P&gt;Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2019 05:49:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-convert-date-to-string-in-the-SOQL-query-in/m-p/2273082#M50170</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-04-23T05:49:03Z</dc:date>
    </item>
  </channel>
</rss>

