<?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: How to convert date format to integer? in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/How-to-convert-date-format-to-integer/m-p/2255718#M38334</link>
    <description>&lt;P&gt;You need to match the tMSSqlOutput schema with your tJavaRow output schema. Alternatively put a tMap between your tJavaRow and your tMSSqlOutput component. That will make it easier for you to connect your columns appropriately.&lt;/P&gt;</description>
    <pubDate>Thu, 11 Oct 2018 21:35:00 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-10-11T21:35:00Z</dc:date>
    <item>
      <title>How to convert date format to integer?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-convert-date-format-to-integer/m-p/2255715#M38331</link>
      <description>&lt;P&gt;Have a source field as&amp;nbsp;2018-10-10 as a date datatype.&amp;nbsp; Would like to convert to&amp;nbsp;20181010, but it should be integer datatype.&amp;nbsp; How can we achieve this by using tJavaRow?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 07:28:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-convert-date-format-to-integer/m-p/2255715#M38331</guid>
      <dc:creator>rp2018</dc:creator>
      <dc:date>2024-11-16T07:28:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert date format to integer?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-convert-date-format-to-integer/m-p/2255716#M38332</link>
      <description>&lt;P&gt;Be aware that if your date is Stored as a Date, it will hold the complete date down to milliseconds. The code below shows converting from a String format (not required here, but I needed to do this to demonstrate how to do what you want) to a Date, and from a Date to an int.&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;//Set my date as a String
String date = "2018-10-10"; 
//Create my Date - Not necessary for you
Date myDate = routines.TalendDate.parseDate("yyyy-MM-dd", date);

//Convert my Date to an int
int myInt = Integer.parseInt(routines.TalendDate.formatDate("yyyyMMdd", myDate));

//Print out my int to prove it is correct
System.out.println(myInt);&lt;/PRE&gt;</description>
      <pubDate>Thu, 11 Oct 2018 17:58:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-convert-date-format-to-integer/m-p/2255716#M38332</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-10-11T17:58:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert date format to integer?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-convert-date-format-to-integer/m-p/2255717#M38333</link>
      <description>&lt;P&gt;The above commands worked fine when using tJavaRow&amp;nbsp;and running the job.&amp;nbsp; But when I connect tJavaRow to tMSSqlOutput, I can't seem to sync the columns.&amp;nbsp; It puts the original source column instead of the column defined after converting it to int in tJavaRow.&amp;nbsp; What should I do to sync it?&lt;/P&gt;</description>
      <pubDate>Thu, 11 Oct 2018 20:32:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-convert-date-format-to-integer/m-p/2255717#M38333</guid>
      <dc:creator>rp2018</dc:creator>
      <dc:date>2018-10-11T20:32:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert date format to integer?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-convert-date-format-to-integer/m-p/2255718#M38334</link>
      <description>&lt;P&gt;You need to match the tMSSqlOutput schema with your tJavaRow output schema. Alternatively put a tMap between your tJavaRow and your tMSSqlOutput component. That will make it easier for you to connect your columns appropriately.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Oct 2018 21:35:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-convert-date-format-to-integer/m-p/2255718#M38334</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-10-11T21:35:00Z</dc:date>
    </item>
  </channel>
</rss>

