<?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 conversion in tDbRow component in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Date-conversion-in-tDbRow-component/m-p/2235683#M24653</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/00539000006eKOgAAM"&gt;@nthampi&lt;/A&gt;&amp;nbsp;,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;thanks for your response.&lt;/P&gt; 
&lt;P&gt;I just fixed it using the below formula.&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;CONVERT&lt;/SPAN&gt;(&lt;SPAN&gt;datetime&lt;/SPAN&gt;,\'"&lt;SPAN&gt;+&lt;/SPAN&gt;((String)globalMap.get("row3.Execution_End_Ts"))&lt;SPAN&gt;+&lt;/SPAN&gt;"\')&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;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 04 Apr 2019 19:03:18 GMT</pubDate>
    <dc:creator>nivedhitha</dc:creator>
    <dc:date>2019-04-04T19:03:18Z</dc:date>
    <item>
      <title>Date conversion in tDbRow component</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Date-conversion-in-tDbRow-component/m-p/2235681#M24651</link>
      <description>&lt;P&gt;Hi Everyone,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I have been having trouble trying to convert a string field to DateTime in tDBRow and insert it into db.&lt;/P&gt; 
&lt;P&gt;I have a date field from tDBInput that im converting to string in tap and im passing to tFlowToIterate and passing it to tDBRow.&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I have to convert this to DateTime of format yyyy-MM-dd HH:mm:ss and insert into SQL Server db.&lt;/P&gt; 
&lt;P&gt;The job I've designed is &lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Screen Shot 2019-04-04 at 12.44.17 PM.png" style="width: 389px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M3XB.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/147193i3E9039600FFA645E/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M3XB.png" alt="0683p000009M3XB.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;converting the date field into string in tmap like this &lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Screen Shot 2019-04-04 at 12.45.15 PM.png" style="width: 400px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M3XL.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/145784i0D57ED5607349B01/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M3XL.png" alt="0683p000009M3XL.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;And then in my tDbRow I have used CAST to change it to DateTimeValue like this&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Screen Shot 2019-04-04 at 12.45.52 PM.png" style="width: 400px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M3XV.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/144229i4ABAFAE4159DFA98/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M3XV.png" alt="0683p000009M3XV.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;I don't receive any error but the date is not getting inserted.&lt;/P&gt; 
&lt;P&gt;I'm committing the inserts, so just not sure what is going wrong here&lt;/P&gt; 
&lt;P&gt;Can someone please help me with this?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Apr 2019 17:51:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Date-conversion-in-tDbRow-component/m-p/2235681#M24651</guid>
      <dc:creator>nivedhitha</dc:creator>
      <dc:date>2019-04-04T17:51:16Z</dc:date>
    </item>
    <item>
      <title>Re: Date conversion in tDbRow component</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Date-conversion-in-tDbRow-component/m-p/2235682#M24652</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; It seems you are not giving the format of the string while generating the insert statement inside tDBRow component.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Could you please refer the below link where the query is similar i.e., to insert to DB in a non standard date format.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://stackoverflow.com/questions/12957635/sql-query-to-insert-datetime-in-sql-server" target="_blank" rel="nofollow noopener noreferrer"&gt;https://stackoverflow.com/questions/12957635/sql-query-to-insert-datetime-in-sql-server&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://stackoverflow.com/questions/44240160/how-to-insert-datetime-like-this-format-dd-mm-yyyy" target="_blank" rel="nofollow noopener noreferrer"&gt;https://stackoverflow.com/questions/44240160/how-to-insert-datetime-like-this-format-dd-mm-yyyy&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>Thu, 04 Apr 2019 18:59:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Date-conversion-in-tDbRow-component/m-p/2235682#M24652</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-04-04T18:59:09Z</dc:date>
    </item>
    <item>
      <title>Re: Date conversion in tDbRow component</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Date-conversion-in-tDbRow-component/m-p/2235683#M24653</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/00539000006eKOgAAM"&gt;@nthampi&lt;/A&gt;&amp;nbsp;,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;thanks for your response.&lt;/P&gt; 
&lt;P&gt;I just fixed it using the below formula.&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;CONVERT&lt;/SPAN&gt;(&lt;SPAN&gt;datetime&lt;/SPAN&gt;,\'"&lt;SPAN&gt;+&lt;/SPAN&gt;((String)globalMap.get("row3.Execution_End_Ts"))&lt;SPAN&gt;+&lt;/SPAN&gt;"\')&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;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Apr 2019 19:03:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Date-conversion-in-tDbRow-component/m-p/2235683#M24653</guid>
      <dc:creator>nivedhitha</dc:creator>
      <dc:date>2019-04-04T19:03:18Z</dc:date>
    </item>
  </channel>
</rss>

