<?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 keep same date format as Database date format? in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/How-to-keep-same-date-format-as-Database-date-format/m-p/2293501#M66470</link>
    <description>&lt;P&gt;I think a bigger issue needs tackling here. Dates are NOT stored with formats. They are simply numbers. Your Date format is just how your device makes it human readable to you. When you want to write a date to a String or use a date in a SQL query, you will have to format it because it is being converted to a different class. But if you are simply passing a date as a date class, formats are irrelevant.&lt;/P&gt;</description>
    <pubDate>Fri, 15 Jun 2018 14:42:31 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-06-15T14:42:31Z</dc:date>
    <item>
      <title>How to keep same date format as Database date format?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-keep-same-date-format-as-Database-date-format/m-p/2293498#M66467</link>
      <description>&lt;P&gt;How do you keep the same date format coming from mssqlinput?&amp;nbsp;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Sqlserver date is&amp;nbsp;2018-06-14 11:44:40.320&lt;/P&gt; 
&lt;P&gt;When mssqlinput passes a date column to tJavaRow the date output is different in the run console.&lt;/P&gt; 
&lt;P&gt;Result from run console&lt;/P&gt; 
&lt;P&gt;[statistics] connected&lt;BR /&gt;Input Date: Thu Jun 14 11:44:40 CDT 2018&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Even I tried converting it in tJavaRow and get the same result.&lt;/P&gt; 
&lt;P&gt;context.run_date = (TalendDate.parseDate("yyyy-MM-dd HH:mm:ss&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M9p6.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/134116iFBD5D7F21624A744/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M9p6.png" alt="0683p000009M9p6.png" /&gt;&lt;/span&gt;SS",TalendDate.formatDate("yyyy-MM-dd HH:mm:ss&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M9p6.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/134116iFBD5D7F21624A744/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M9p6.png" alt="0683p000009M9p6.png" /&gt;&lt;/span&gt;SS",row1.InputStart)));&lt;/P&gt; 
&lt;P&gt;System.out.println("run_date: "+context.run_date);&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jun 2018 20:34:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-keep-same-date-format-as-Database-date-format/m-p/2293498#M66467</guid>
      <dc:creator>rp2018</dc:creator>
      <dc:date>2018-06-14T20:34:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to keep same date format as Database date format?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-keep-same-date-format-as-Database-date-format/m-p/2293499#M66468</link>
      <description>&lt;P&gt;if ti only for println, You&amp;nbsp;do not need double conversion, use just formatDate&lt;/P&gt;&lt;PRE&gt;context.run_date_print = (TalendDate.parseDate("yyyy-MM-dd HH:mm:ss.SS",TalendDate.formatDate("yyyy-MM-dd HH:mm:ss.SS",row4.date_as_date))) ;
&lt;STRONG&gt;context.run_date_print_string = TalendDate.formatDate("yyyy-MM-dd HH:mm:ss.SS",row4.date_as_date) ;&lt;/STRONG&gt;

System.out.println("run_date_as_date: "+context.run_date_print);
System.out.println("run_date_as_string: "+context.run_date_print_string);&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;run_date_as_date: Thu Jun 14 11:44:40 NZST 2018
run_date_as_string: 2018-06-14 11:44:40.320&lt;/PRE&gt;</description>
      <pubDate>Thu, 14 Jun 2018 22:04:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-keep-same-date-format-as-Database-date-format/m-p/2293499#M66468</guid>
      <dc:creator>vapukov</dc:creator>
      <dc:date>2018-06-14T22:04:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to keep same date format as Database date format?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-keep-same-date-format-as-Database-date-format/m-p/2293500#M66469</link>
      <description>&lt;P&gt;Thanks this worked.&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>Fri, 15 Jun 2018 14:32:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-keep-same-date-format-as-Database-date-format/m-p/2293500#M66469</guid>
      <dc:creator>rp2018</dc:creator>
      <dc:date>2018-06-15T14:32:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to keep same date format as Database date format?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-keep-same-date-format-as-Database-date-format/m-p/2293501#M66470</link>
      <description>&lt;P&gt;I think a bigger issue needs tackling here. Dates are NOT stored with formats. They are simply numbers. Your Date format is just how your device makes it human readable to you. When you want to write a date to a String or use a date in a SQL query, you will have to format it because it is being converted to a different class. But if you are simply passing a date as a date class, formats are irrelevant.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jun 2018 14:42:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-keep-same-date-format-as-Database-date-format/m-p/2293501#M66470</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-06-15T14:42:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to keep same date format as Database date format?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-keep-same-date-format-as-Database-date-format/m-p/2293502#M66471</link>
      <description>&lt;P&gt;I think - this is not a "issue", this is just proper usage&lt;/P&gt;</description>
      <pubDate>Sat, 16 Jun 2018 01:41:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-keep-same-date-format-as-Database-date-format/m-p/2293502#M66471</guid>
      <dc:creator>vapukov</dc:creator>
      <dc:date>2018-06-16T01:41:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to keep same date format as Database date format?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-keep-same-date-format-as-Database-date-format/m-p/2293503#M66472</link>
      <description>&lt;P&gt;I think you may have misunderstood what I was getting at&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/005390000067LRbAAM"&gt;@vapukov&lt;/A&gt;. The "issue" here is that too many developers seem confused by Dates and expect them to be formatted as part of the object. This misunderstanding leads to lots of questions and confusion over Dates with Talend.&lt;/P&gt;</description>
      <pubDate>Sat, 16 Jun 2018 12:52:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-keep-same-date-format-as-Database-date-format/m-p/2293503#M66472</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-06-16T12:52:49Z</dc:date>
    </item>
  </channel>
</rss>

