<?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] Check if a string is a valid date pattern ? in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/resolved-Check-if-a-string-is-a-valid-date-pattern/m-p/2226681#M18512</link>
    <description>Right, I suppose I should start brushing up on my Java ASAP.
&lt;BR /&gt;Thanks again for your help.
&lt;BR /&gt;-Mircea</description>
    <pubDate>Thu, 07 Jan 2010 06:33:34 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2010-01-07T06:33:34Z</dc:date>
    <item>
      <title>[resolved] Check if a string is a valid date pattern ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Check-if-a-string-is-a-valid-date-pattern/m-p/2226667#M18498</link>
      <description>Hi there,&lt;BR /&gt;I have a CSV File as a source, one of the field is supposed to be a date&lt;BR /&gt;But sometimes, some rows deliver this field with an invalid string for a date  (for example : "378-35-23", or "NaN-NaN-NaN", etc ...)&lt;BR /&gt;I would like to test the content of this field to: &lt;BR /&gt; 1*  Load the correct rows in the target database&lt;BR /&gt; 2*  Reject the bad rows in an output file       or      Replace the bad data by a default one (NULL or 01/01/1900 for example)&lt;BR /&gt;Should I use tFilterRow ? &lt;BR /&gt;What is the method to valid the string pattern ?&lt;BR /&gt;How should I declare the data type for this field in my source input file ?&lt;BR /&gt;&lt;BR /&gt;thx&lt;BR /&gt;Phil</description>
      <pubDate>Sat, 16 Nov 2024 14:19:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Check-if-a-string-is-a-valid-date-pattern/m-p/2226667#M18498</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T14:19:17Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Check if a string is a valid date pattern ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Check-if-a-string-is-a-valid-date-pattern/m-p/2226668#M18499</link>
      <description>Hello
&lt;BR /&gt;
&lt;BLOCKQUOTE&gt;
 &lt;TABLE border="1"&gt;
  &lt;TBODY&gt;
   &lt;TR&gt;
    &lt;TD&gt;Should I use tFilterRow ? &lt;BR /&gt;What is the method to valid the string pattern ?&lt;BR /&gt;How should I declare the data type for this field in my source input file ?&lt;/TD&gt;
   &lt;/TR&gt;
  &lt;/TBODY&gt;
 &lt;/TABLE&gt;
&lt;/BLOCKQUOTE&gt;
&lt;BR /&gt;Yes, you can use the tFilterRow to filter the invalid date and output them in a file, declare the data type for this field as string. All the valid data in this field should have a unite format, for exmaple the length of them are the same. After filter all the valid data, you can convert a String to a Date. for example, 
&lt;BR /&gt;
&lt;PRE&gt;TalendDate.parseDate("MM/dd/yyyy",06/26/2008)&lt;/PRE&gt;
&lt;BR /&gt;Best regards
&lt;BR /&gt; shong</description>
      <pubDate>Thu, 26 Jun 2008 07:24:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Check-if-a-string-is-a-valid-date-pattern/m-p/2226668#M18499</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-06-26T07:24:25Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Check if a string is a valid date pattern ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Check-if-a-string-is-a-valid-date-pattern/m-p/2226669#M18500</link>
      <description>ok thx shong
&lt;BR /&gt;
&lt;BR /&gt;is there any method like isValidDate(&amp;lt;&amp;lt;myString as string&amp;gt;&amp;gt;, &amp;lt;&amp;lt;myDateFormat as string&amp;gt;&amp;gt;) return 0 or 1 for OK or Not OK ??</description>
      <pubDate>Thu, 26 Jun 2008 07:49:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Check-if-a-string-is-a-valid-date-pattern/m-p/2226669#M18500</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-06-26T07:49:38Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Check if a string is a valid date pattern ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Check-if-a-string-is-a-valid-date-pattern/m-p/2226670#M18501</link>
      <description>is there any method like isValidDate(&amp;lt;&amp;lt;myString as string&amp;gt;&amp;gt;, &amp;lt;&amp;lt;myDateFormat as string&amp;gt;&amp;gt;) return 0 or 1 for OK or Not OK ??  &lt;BR /&gt;Did you get the answer yet / please share if you do</description>
      <pubDate>Tue, 26 May 2009 22:38:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Check-if-a-string-is-a-valid-date-pattern/m-p/2226670#M18501</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-05-26T22:38:59Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Check if a string is a valid date pattern ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Check-if-a-string-is-a-valid-date-pattern/m-p/2226671#M18502</link>
      <description>I don't know about TalendDate.parseDate, but SimpleDateFormat.parse throws exception u could catch and return false otherwhise true.</description>
      <pubDate>Wed, 27 May 2009 01:17:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Check-if-a-string-is-a-valid-date-pattern/m-p/2226671#M18502</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-05-27T01:17:17Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Check if a string is a valid date pattern ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Check-if-a-string-is-a-valid-date-pattern/m-p/2226672#M18503</link>
      <description>sahanakrish, double posting and reviving old threads is frowned upon in most forums.</description>
      <pubDate>Wed, 27 May 2009 06:50:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Check-if-a-string-is-a-valid-date-pattern/m-p/2226672#M18503</guid>
      <dc:creator>c0utta</dc:creator>
      <dc:date>2009-05-27T06:50:53Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Check if a string is a valid date pattern ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Check-if-a-string-is-a-valid-date-pattern/m-p/2226673#M18504</link>
      <description>Hello, relatively new to Talend, trying to help out a friend.
&lt;BR /&gt;Trying to convert SQL Server date time value into 8 digit int for fact table (DateKey) column that is an FK to a Date Dim. Not having much luck with Expression Builder.
&lt;BR /&gt;So from: 
&lt;BR /&gt;"2008-09-29 01:56:26.393" to "20080929"
&lt;BR /&gt;Convert(VARCHAR(10), DomAtyVisitDateEnt, 112) AS - gets me the desired results in T-SQL.
&lt;BR /&gt;And if possible the same for the FK (TimeKey) Time Dim
&lt;BR /&gt;"2008-09-29 01:56:26.393" to "015626"
&lt;BR /&gt;Any ideas or references would be great. The job is in "Java" (not Perl) if that helps.
&lt;BR /&gt;Thanks, Mircea</description>
      <pubDate>Thu, 07 Jan 2010 00:08:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Check-if-a-string-is-a-valid-date-pattern/m-p/2226673#M18504</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-01-07T00:08:29Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Check if a string is a valid date pattern ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Check-if-a-string-is-a-valid-date-pattern/m-p/2226674#M18505</link>
      <description>Hello Mircea
&lt;BR /&gt;
&lt;BLOCKQUOTE&gt;
 &lt;TABLE border="1"&gt;
  &lt;TBODY&gt;
   &lt;TR&gt;
    &lt;TD&gt;Convert(VARCHAR(10), DomAtyVisitDateEnt, 112) AS - gets me the desired results in T-SQL.&lt;/TD&gt;
   &lt;/TR&gt;
  &lt;/TBODY&gt;
 &lt;/TABLE&gt;
&lt;/BLOCKQUOTE&gt;
&lt;BR /&gt;In Talend, you don't need use the convert function on sql, just define the date pattern on the schema of input/output component.
&lt;BR /&gt;on the schema of input component, set the date pattern as:
&lt;BR /&gt;"yyyy-MM-dd HH:mm:ss.sss"
&lt;BR /&gt;on the schema of output component, set the date pattern as:
&lt;BR /&gt;"yyyyMMdd"
&lt;BR /&gt;Best regards
&lt;BR /&gt; shong</description>
      <pubDate>Thu, 07 Jan 2010 02:59:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Check-if-a-string-is-a-valid-date-pattern/m-p/2226674#M18505</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-01-07T02:59:03Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Check if a string is a valid date pattern ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Check-if-a-string-is-a-valid-date-pattern/m-p/2226675#M18506</link>
      <description>Shong;
&lt;BR /&gt;Thanks for your response. I am still just a little bit confused. 
&lt;BR /&gt;When you say input/output component (singular) are you talking about the tMap component? Or did you mean the input (data source) and the output (target) components? If the latter, am I editing the schema on the component itself?
&lt;BR /&gt;Thanks, Mircea</description>
      <pubDate>Thu, 07 Jan 2010 04:47:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Check-if-a-string-is-a-valid-date-pattern/m-p/2226675#M18506</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-01-07T04:47:00Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Check if a string is a valid date pattern ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Check-if-a-string-is-a-valid-date-pattern/m-p/2226676#M18507</link>
      <description>Hello 
&lt;BR /&gt;
&lt;BLOCKQUOTE&gt;
 &lt;TABLE border="1"&gt;
  &lt;TBODY&gt;
   &lt;TR&gt;
    &lt;TD&gt;If the latter, am I editing the schema on the component itself?&lt;/TD&gt;
   &lt;/TR&gt;
  &lt;/TBODY&gt;
 &lt;/TABLE&gt;
&lt;/BLOCKQUOTE&gt;
&lt;BR /&gt;I mean the latter point, for example:
&lt;BR /&gt;tMSSQLInput---tLogRow
&lt;BR /&gt;on the schema of tMSSQLInput, set the date pattern as:
&lt;BR /&gt;"yyyy-MM-dd HH:mm:ss.sss"
&lt;BR /&gt;on the schema of tLogRow, set the date pattern as:
&lt;BR /&gt;"yyyyMMdd"
&lt;BR /&gt;Best regards
&lt;BR /&gt; shong</description>
      <pubDate>Thu, 07 Jan 2010 04:49:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Check-if-a-string-is-a-valid-date-pattern/m-p/2226676#M18507</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-01-07T04:49:41Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Check if a string is a valid date pattern ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Check-if-a-string-is-a-valid-date-pattern/m-p/2226677#M18508</link>
      <description>Okay, that makes sense, thanks.
&lt;BR /&gt;On the "tLogRow" I cannot set the date pattern because it is an "int". I am copying the date to a date column (know how to do that) and to an int column in the fact table. The copying to the int column is where I am having issues. I am unfamiliar with the what the correct expression should be. 
&lt;BR /&gt;I cited the SQL Convert example only to show what I am trying to do.
&lt;BR /&gt;What I need help with is answering how I would convert a date (from the source) to an (8 digit) int (target) to be used as an FK to the Date dim. 
&lt;BR /&gt;Would this be handled at the expression level? Thanks for your patience.</description>
      <pubDate>Thu, 07 Jan 2010 05:39:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Check-if-a-string-is-a-valid-date-pattern/m-p/2226677#M18508</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-01-07T05:39:31Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Check if a string is a valid date pattern ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Check-if-a-string-is-a-valid-date-pattern/m-p/2226678#M18509</link>
      <description>Hello
&lt;BR /&gt;
&lt;BLOCKQUOTE&gt;
 &lt;TABLE border="1"&gt;
  &lt;TBODY&gt;
   &lt;TR&gt;
    &lt;TD&gt;On the "tLogRow" I cannot set the date pattern because it is an "int".&lt;/TD&gt;
   &lt;/TR&gt;
  &lt;/TBODY&gt;
 &lt;/TABLE&gt;
&lt;/BLOCKQUOTE&gt;
&lt;BR /&gt;You need convert date to int, see my screenshot.
&lt;BR /&gt;
&lt;PRE&gt;Integer.parseInt(TalendDate.formatDate("yyyyMMdd",row2.date))&lt;/PRE&gt;
&lt;BR /&gt;Best regards
&lt;BR /&gt; shong</description>
      <pubDate>Thu, 07 Jan 2010 05:49:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Check-if-a-string-is-a-valid-date-pattern/m-p/2226678#M18509</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-01-07T05:49:04Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Check if a string is a valid date pattern ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Check-if-a-string-is-a-valid-date-pattern/m-p/2226679#M18510</link>
      <description>That did it! Thank you very much. 
&lt;BR /&gt;Where could I have found the "Integer.parseInt()"? 
&lt;BR /&gt;It is not available in my expression builder. Is there a list with descriptions some place in Studio? 
&lt;BR /&gt;Thanks again.</description>
      <pubDate>Thu, 07 Jan 2010 06:15:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Check-if-a-string-is-a-valid-date-pattern/m-p/2226679#M18510</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-01-07T06:15:16Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Check if a string is a valid date pattern ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Check-if-a-string-is-a-valid-date-pattern/m-p/2226680#M18511</link>
      <description>Hello 
&lt;BR /&gt; 
&lt;BLOCKQUOTE&gt; 
 &lt;TABLE border="1"&gt; 
  &lt;TBODY&gt; 
   &lt;TR&gt; 
    &lt;TD&gt;Where could I have found the "Integer.parseInt()"?&lt;/TD&gt; 
   &lt;/TR&gt; 
  &lt;/TBODY&gt; 
 &lt;/TABLE&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;BR /&gt;It is Java code, not sql function. 
&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; As you known, Talend product is developed in Java and you are working a Java project. 
&lt;BR /&gt;Best regards 
&lt;BR /&gt; shong</description>
      <pubDate>Thu, 07 Jan 2010 06:19:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Check-if-a-string-is-a-valid-date-pattern/m-p/2226680#M18511</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-01-07T06:19:35Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Check if a string is a valid date pattern ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Check-if-a-string-is-a-valid-date-pattern/m-p/2226681#M18512</link>
      <description>Right, I suppose I should start brushing up on my Java ASAP.
&lt;BR /&gt;Thanks again for your help.
&lt;BR /&gt;-Mircea</description>
      <pubDate>Thu, 07 Jan 2010 06:33:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Check-if-a-string-is-a-valid-date-pattern/m-p/2226681#M18512</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-01-07T06:33:34Z</dc:date>
    </item>
  </channel>
</rss>

