<?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 replace a blank date with a &amp;quot;Null Value&amp;quot; in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/How-to-replace-a-blank-date-with-a-quot-Null-Value-quot/m-p/2356644#M122121</link>
    <description>Hello
&lt;BR /&gt;
&lt;BLOCKQUOTE&gt;
 &lt;TABLE border="1"&gt;
  &lt;TBODY&gt;
   &lt;TR&gt;
    &lt;TD&gt;Is it possible (without conversions) to sum up durations given in HH:mm:ss, or will get confused because there is always a date involved?&lt;/TD&gt;
   &lt;/TR&gt;
  &lt;/TBODY&gt;
 &lt;/TABLE&gt;
&lt;/BLOCKQUOTE&gt;
&lt;BR /&gt;It is always a date involved, it is a excel API limitation.
&lt;BR /&gt;Best regards
&lt;BR /&gt; 
&lt;BR /&gt; shong</description>
    <pubDate>Thu, 12 Nov 2009 07:16:40 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2009-11-12T07:16:40Z</dc:date>
    <item>
      <title>How to replace a blank date with a "Null Value"</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-replace-a-blank-date-with-a-quot-Null-Value-quot/m-p/2356641#M122118</link>
      <description>Hello, 
&lt;BR /&gt;I am testing TOS and I really like it 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MA9p.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/138034i5F552429DA646D6F/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MA9p.png" alt="0683p000009MA9p.png" /&gt;&lt;/span&gt; 
&lt;BR /&gt;I've got a short question: I am joining two csv files containing a date field that I output into an excel file. 
&lt;BR /&gt;The inport format is HH:mm:ss and in my excel output file TOS automatically replaces that with ""dd-MM-yyyy HH:mm:ss" eg "06:12:17" gets "01.01.1970 06:12:17" even though the scheme is defined as "HH:mm:ss". 
&lt;BR /&gt;In order to get the right format in the excel file i tried to use TalendDate.formatdate but it gives me a null exception because some values are acually blank after the initial join. 
&lt;BR /&gt;Hence, I was looking for an expression to replace a blank date with something like: 
&lt;BR /&gt;test.date == null ? 0:test.date 
&lt;BR /&gt;but it doesn't work (and I don't think it is possible). 
&lt;BR /&gt;Any advices? Thanks in advance. 
&lt;BR /&gt;I am using TOS 3.2. on Windows with a Java project. I searched the forum but I couldn't find anything. 
&lt;BR /&gt;Cheers, 
&lt;BR /&gt;James</description>
      <pubDate>Sat, 16 Nov 2024 13:41:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-replace-a-blank-date-with-a-quot-Null-Value-quot/m-p/2356641#M122118</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T13:41:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to replace a blank date with a "Null Value"</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-replace-a-blank-date-with-a-quot-Null-Value-quot/m-p/2356642#M122119</link>
      <description>Hello
&lt;BR /&gt;
&lt;BLOCKQUOTE&gt;
 &lt;TABLE border="1"&gt;
  &lt;TBODY&gt;
   &lt;TR&gt;
    &lt;TD&gt;The inport format is HH:mm:ss and in my excel output file TOS automatically replaces that with ""dd-MM-yyyy HH:mm:ss" eg "06:12:17" gets "01.01.1970 06:12:17" even though the scheme is defined as "HH:mm:ss".&lt;/TD&gt;
   &lt;/TR&gt;
  &lt;/TBODY&gt;
 &lt;/TABLE&gt;
&lt;/BLOCKQUOTE&gt;
&lt;BR /&gt;You can read it as String type and output it to excel file as String type. If you need to convert a Date to a string, using TalendDate.formatDate(String pattern, Date date) eg:
&lt;BR /&gt;test.date==null?null: TalendDate.formatDate("HH:mm:ss", test.date) //test.date is Date type
&lt;BR /&gt;Best regards
&lt;BR /&gt; shong</description>
      <pubDate>Tue, 10 Nov 2009 08:23:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-replace-a-blank-date-with-a-quot-Null-Value-quot/m-p/2356642#M122119</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-11-10T08:23:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to replace a blank date with a "Null Value"</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-replace-a-blank-date-with-a-quot-Null-Value-quot/m-p/2356643#M122120</link>
      <description>Thanks fo the answer, shong. It works like proposed, exept for the fact that excel does not recognize the format, which it did when using 'date' format. I check in the output options to leave the format definition excel as set (HH:mm:ss). I have a sum function that sums up durations and unless I click into the cells and press enter it does not regpognize the format. Propably this some kind of excel bug. 
&lt;BR /&gt;However, I have one more question: Is it possible (without conversions) to sum up durations given in HH:mm:ss, or will get confused because there is always a date involved? 
&lt;BR /&gt;Cheers, 
&lt;BR /&gt;James</description>
      <pubDate>Wed, 11 Nov 2009 13:44:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-replace-a-blank-date-with-a-quot-Null-Value-quot/m-p/2356643#M122120</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-11-11T13:44:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to replace a blank date with a "Null Value"</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-replace-a-blank-date-with-a-quot-Null-Value-quot/m-p/2356644#M122121</link>
      <description>Hello
&lt;BR /&gt;
&lt;BLOCKQUOTE&gt;
 &lt;TABLE border="1"&gt;
  &lt;TBODY&gt;
   &lt;TR&gt;
    &lt;TD&gt;Is it possible (without conversions) to sum up durations given in HH:mm:ss, or will get confused because there is always a date involved?&lt;/TD&gt;
   &lt;/TR&gt;
  &lt;/TBODY&gt;
 &lt;/TABLE&gt;
&lt;/BLOCKQUOTE&gt;
&lt;BR /&gt;It is always a date involved, it is a excel API limitation.
&lt;BR /&gt;Best regards
&lt;BR /&gt; 
&lt;BR /&gt; shong</description>
      <pubDate>Thu, 12 Nov 2009 07:16:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-replace-a-blank-date-with-a-quot-Null-Value-quot/m-p/2356644#M122121</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-11-12T07:16:40Z</dc:date>
    </item>
  </channel>
</rss>

