<?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: [resolved] Transform bigdecimal to timestamp in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/resolved-Transform-bigdecimal-to-timestamp/m-p/2324158#M93904</link>
    <description>Hello Brandon,
&lt;BR /&gt;your suggestion
&lt;BR /&gt;TalendDate.parseDate("yyyy-MM-dd HH:mm:ss.SSS",row2.millis.longValue().toString());
&lt;BR /&gt;does not work, because you can't call .toString() on a primitive type long and i need to calculate the date first, right?</description>
    <pubDate>Tue, 22 Nov 2011 15:19:03 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2011-11-22T15:19:03Z</dc:date>
    <item>
      <title>[resolved] Transform bigdecimal to timestamp</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Transform-bigdecimal-to-timestamp/m-p/2324154#M93900</link>
      <description>Hello community, 
&lt;BR /&gt;I need to transform an Oracle db-column of type BigDecimal (in Talend), which represents the number of milliseconds from a certain point in time on, into a human readable format, e.g. a timestamp (2011-11-08 10:59:10.38), using the tMap+Var expression component. 
&lt;BR /&gt;I tried things like that: 
&lt;BR /&gt;row2.millis ==null ? "" : new java.sql.timestamp(row2.millis.longValue()).toString(); 
&lt;BR /&gt;This terminates with a compile error. Do I have to import libs to the build path or something? 
&lt;BR /&gt;I am pretty new to talend. Can someone please tell me, how this is done properly? Thanks in advance!</description>
      <pubDate>Sat, 16 Nov 2024 12:33:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Transform-bigdecimal-to-timestamp/m-p/2324154#M93900</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T12:33:28Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Transform bigdecimal to timestamp</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Transform-bigdecimal-to-timestamp/m-p/2324155#M93901</link>
      <description>Hi, to test if a variable is null, use Relational.ISNULL(row2.millis). Then I don't usertand, you row2.millis is only a BigDecimal which represents the milliseconds or is it a timestamp?</description>
      <pubDate>Tue, 22 Nov 2011 14:07:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Transform-bigdecimal-to-timestamp/m-p/2324155#M93901</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-11-22T14:07:06Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Transform bigdecimal to timestamp</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Transform-bigdecimal-to-timestamp/m-p/2324156#M93902</link>
      <description>Hi I think you could use the following, 
&lt;BR /&gt;but again don't really understand you an example of your bigDecimal could help: 
&lt;BR /&gt;TalendDate.parseDate("yyyy-MM-dd HH:mm:ss.SSS",row2.millis.longValue().toString()); 
&lt;BR /&gt;Regards, 
&lt;BR /&gt;Brandon</description>
      <pubDate>Tue, 22 Nov 2011 14:30:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Transform-bigdecimal-to-timestamp/m-p/2324156#M93902</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-11-22T14:30:38Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Transform bigdecimal to timestamp</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Transform-bigdecimal-to-timestamp/m-p/2324157#M93903</link>
      <description>Hey, thanks for your reply! I will change the "isNull-test"! 
&lt;BR /&gt;rows2.millis is a field in a db-table of type Number(35,0), that is translated to BigDecimal by Talend (DB Schema retrieval). This number counts the milliseconds from a certain point in time (e.g. 1.1.1970 00:00:00:000). What I need is to recalculate the timestamp meaning the actual date and time. 
&lt;BR /&gt;Input (BigDecimal): "23483265123" -- &amp;gt; Output (String): "22.11.2011 - 15:30:14:345" 
&lt;BR /&gt;I just dont know how this is done correctly with the talend tMap component. 
&lt;BR /&gt;Cheers</description>
      <pubDate>Tue, 22 Nov 2011 14:31:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Transform-bigdecimal-to-timestamp/m-p/2324157#M93903</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-11-22T14:31:50Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Transform bigdecimal to timestamp</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Transform-bigdecimal-to-timestamp/m-p/2324158#M93904</link>
      <description>Hello Brandon,
&lt;BR /&gt;your suggestion
&lt;BR /&gt;TalendDate.parseDate("yyyy-MM-dd HH:mm:ss.SSS",row2.millis.longValue().toString());
&lt;BR /&gt;does not work, because you can't call .toString() on a primitive type long and i need to calculate the date first, right?</description>
      <pubDate>Tue, 22 Nov 2011 15:19:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Transform-bigdecimal-to-timestamp/m-p/2324158#M93904</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-11-22T15:19:03Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Transform bigdecimal to timestamp</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Transform-bigdecimal-to-timestamp/m-p/2324159#M93905</link>
      <description>Hi wi-ler&lt;BR /&gt;you can use the following code in your tmap:&lt;BR /&gt;TalendDate.parseDate("ss",String.valueOf(row2.test.divide(new BigDecimal("1000"))))&lt;BR /&gt;and make sure you set your output shown in the picture attached.&lt;BR /&gt;Regards,&lt;BR /&gt;Brandon</description>
      <pubDate>Wed, 23 Nov 2011 14:39:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Transform-bigdecimal-to-timestamp/m-p/2324159#M93905</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-11-23T14:39:34Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Transform bigdecimal to timestamp</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Transform-bigdecimal-to-timestamp/m-p/2324160#M93906</link>
      <description>Hello Brandon,
&lt;BR /&gt;my latest solution looks as follows:
&lt;BR /&gt;Relational.ISNULL(row2.millis) ? null : new java.util.Date(row2.millis+OFFSET);
&lt;BR /&gt;Before that I convert the BigDecimal into a long with tConvertType. Then I set the date pattern as you said.
&lt;BR /&gt;Thanks for your help!</description>
      <pubDate>Wed, 23 Nov 2011 16:05:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Transform-bigdecimal-to-timestamp/m-p/2324160#M93906</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-11-23T16:05:23Z</dc:date>
    </item>
  </channel>
</rss>

