<?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 Date format for DB2 database in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Date-format-for-DB2-database/m-p/150923#M28858</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;He John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the help, but still it's not working.&lt;/P&gt;&lt;P&gt;When slicing up the formula it appears that the function text(JDEDATE) returns an scripterror bij Qlikview.&lt;/P&gt;&lt;P&gt;What am I doing wrong?&lt;/P&gt;&lt;P&gt;Strangly enough the function date wthout any parameters on the field e.g. date(JDEDATE) will return me on a Julian date of 109254 a result of "16-2-0300" while using the default settings for dates. I can't explain.&lt;/P&gt;&lt;P&gt;With kind regards.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Leo&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 18 Sep 2009 14:18:42 GMT</pubDate>
    <dc:creator />
    <dc:date>2009-09-18T14:18:42Z</dc:date>
    <item>
      <title>Date format for DB2 database</title>
      <link>https://community.qlik.com/t5/QlikView/Date-format-for-DB2-database/m-p/150917#M28852</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Is there any specific date format required while extracting data from DB2 database?&lt;/P&gt;&lt;P&gt;Because, I have extracted data from the DB2 database.In that data, date values are showing in numbers.&lt;/P&gt;&lt;P&gt;If we are using, mid,left or right function then i am not able to get proper date format for all values.&lt;/P&gt;&lt;P&gt;Is there any specific date format for DB2 db.&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Durai&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 02 Aug 2009 14:22:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-format-for-DB2-database/m-p/150917#M28852</guid>
      <dc:creator>ipauldur</dc:creator>
      <dc:date>2009-08-02T14:22:32Z</dc:date>
    </item>
    <item>
      <title>Date format for DB2 database</title>
      <link>https://community.qlik.com/t5/QlikView/Date-format-for-DB2-database/m-p/150918#M28853</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;May be the date# function can help you while reading the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Best Regards,&lt;/P&gt;&lt;P&gt;Kuldeep Tak&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Aug 2009 10:47:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-format-for-DB2-database/m-p/150918#M28853</guid>
      <dc:creator />
      <dc:date>2009-08-03T10:47:19Z</dc:date>
    </item>
    <item>
      <title>Date format for DB2 database</title>
      <link>https://community.qlik.com/t5/QlikView/Date-format-for-DB2-database/m-p/150919#M28854</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Dura,&lt;/P&gt;&lt;P&gt;Did you get the final solution for your problem with date format from a DB2 Database?&lt;/P&gt;&lt;P&gt;I can't get it to work correctly (year/month/week/day) even with the functions date or date#.&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Leo&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Sep 2009 22:09:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-format-for-DB2-database/m-p/150919#M28854</guid>
      <dc:creator />
      <dc:date>2009-09-10T22:09:52Z</dc:date>
    </item>
    <item>
      <title>Date format for DB2 database</title>
      <link>https://community.qlik.com/t5/QlikView/Date-format-for-DB2-database/m-p/150920#M28855</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's all a matter of what you're using for your format in DB2, and what format you want the final result to be in. If you're specifically using the DB2 DATE format, I believe that's YYYY-MM-DD. So if you wanted your final result to be in DD/MM/YY, you would use date(date#(MyDB2Date,'YYYY-MM-DD'),'DD/MM/YY'). We're instead storing dates as integers in YYYYMMDD format, and want to see them in QlikView in MM/DD/YY format, so we use date(date#(MyDB2Date,'YYYYMMDD'),'MM/DD/YY').&lt;/P&gt;&lt;P&gt;So...&lt;/P&gt;&lt;P&gt;What does your DB2 date look like?&lt;/P&gt;&lt;P&gt;What do you want your date to look like in QlikView?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Sep 2009 02:25:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-format-for-DB2-database/m-p/150920#M28855</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2009-09-11T02:25:44Z</dc:date>
    </item>
    <item>
      <title>Date format for DB2 database</title>
      <link>https://community.qlik.com/t5/QlikView/Date-format-for-DB2-database/m-p/150921#M28856</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;He John,&lt;/P&gt;&lt;P&gt;Thanks for the quick respond. I'll have to expand my first mail with some other info.&lt;/P&gt;&lt;P&gt;We're using JDEdwards on a DB2 database and JDEdwards writes the date in an Julian format, "CYYDDD" , the century after 1900, the year in that century and the Julian date within that year. Examples: 105031 - January 31, 2005 ,107263 - September 20, 2007 and 98129 - May 9, 1998&lt;/P&gt;&lt;P&gt;An SQL-expression for displaying dates in "normal format" is e.g. date(1900+(JDEDATE/1000),1,1)+val(right(str(field1),3))-1&lt;/P&gt;&lt;P&gt;What should be the Qlickview-statement for showing Julian dates in an format like "DD-MM-YYYY"?&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;Leo&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Sep 2009 12:59:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-format-for-DB2-database/m-p/150921#M28856</guid>
      <dc:creator />
      <dc:date>2009-09-11T12:59:13Z</dc:date>
    </item>
    <item>
      <title>Date format for DB2 database</title>
      <link>https://community.qlik.com/t5/QlikView/Date-format-for-DB2-database/m-p/150922#M28857</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK, I don't think QlikView has a date formatting string to read it in directly, so we'll just build it exactly like you showed, just translated for QlikView. Two extra functions required, the first is floor() because otherwise the division will keep the decimal portion, and we'll fail to make the date. The second is the date() function to tell QlikView that this is a date, and the final format you want the date to be displayed in. You could skip the date formatting if that is your default date format in the script, but I usually specify it explicitly.&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;date(makedate(1900 + floor(JDEDATE/1000),1,1)+num(right(text(JEDATE),3))-1,'DD-MM-YYYY')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Sep 2009 23:52:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-format-for-DB2-database/m-p/150922#M28857</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2009-09-11T23:52:24Z</dc:date>
    </item>
    <item>
      <title>Date format for DB2 database</title>
      <link>https://community.qlik.com/t5/QlikView/Date-format-for-DB2-database/m-p/150923#M28858</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;He John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the help, but still it's not working.&lt;/P&gt;&lt;P&gt;When slicing up the formula it appears that the function text(JDEDATE) returns an scripterror bij Qlikview.&lt;/P&gt;&lt;P&gt;What am I doing wrong?&lt;/P&gt;&lt;P&gt;Strangly enough the function date wthout any parameters on the field e.g. date(JDEDATE) will return me on a Julian date of 109254 a result of "16-2-0300" while using the default settings for dates. I can't explain.&lt;/P&gt;&lt;P&gt;With kind regards.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Leo&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Sep 2009 14:18:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-format-for-DB2-database/m-p/150923#M28858</guid>
      <dc:creator />
      <dc:date>2009-09-18T14:18:42Z</dc:date>
    </item>
    <item>
      <title>Date format for DB2 database</title>
      <link>https://community.qlik.com/t5/QlikView/Date-format-for-DB2-database/m-p/150924#M28859</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not sure why text(JDEDATE) would fail. Text(109254) works fine for me.&lt;/P&gt;&lt;P&gt;As for what QlikView is doing when you say date(109254), it should be treating 109254 as the number of days since December 30, 1899. Figuring about 365.2425 days per year, that gives us 299.127 years. My machine is returning February 14, 2199, which is in the neighborhood. I'm not sure why you would be getting February 16, 300. My machine puts that at -584340.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Sep 2009 23:53:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-format-for-DB2-database/m-p/150924#M28859</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2009-09-21T23:53:49Z</dc:date>
    </item>
    <item>
      <title>Date format for DB2 database</title>
      <link>https://community.qlik.com/t5/QlikView/Date-format-for-DB2-database/m-p/150925#M28860</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Leo,&lt;/P&gt;&lt;P&gt;This julian date problem was solved by a collegue of mine:&lt;/P&gt;&lt;P&gt;date(makedate(1900+mid(JDEDATE,1,len(JDEDATE)-3))+mid(JDEDATE,len(JDEDATE)-2,3)-1) AS Yourdate&lt;/P&gt;&lt;P&gt;Kind regard,&lt;/P&gt;&lt;P&gt;Frank&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 26 Sep 2009 18:01:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-format-for-DB2-database/m-p/150925#M28860</guid>
      <dc:creator />
      <dc:date>2009-09-26T18:01:58Z</dc:date>
    </item>
    <item>
      <title>Date format for DB2 database</title>
      <link>https://community.qlik.com/t5/QlikView/Date-format-for-DB2-database/m-p/150926#M28861</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Mean JDE Date taken as String for QV, am I right to say so?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 30 May 2010 05:06:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-format-for-DB2-database/m-p/150926#M28861</guid>
      <dc:creator />
      <dc:date>2010-05-30T05:06:18Z</dc:date>
    </item>
    <item>
      <title>Date format for DB2 database</title>
      <link>https://community.qlik.com/t5/QlikView/Date-format-for-DB2-database/m-p/150927#M28862</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is another solution in converting a db2 date as part of the data load.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SUBSTR(DIGITS(DATEFIELD), 5, 2)||'/' || SUBSTR(DIGITS(DATEFIELD), 7, 2)||'/'||SUBSTR(DIGITS(DATEFIELD), 1, 4) AS dateName&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Jun 2010 20:41:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-format-for-DB2-database/m-p/150927#M28862</guid>
      <dc:creator />
      <dc:date>2010-06-11T20:41:35Z</dc:date>
    </item>
    <item>
      <title>Re: Date format for DB2 database</title>
      <link>https://community.qlik.com/t5/QlikView/Date-format-for-DB2-database/m-p/150928#M28863</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this&lt;/P&gt;&lt;P style="font-size: 12.222222328186035px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #edf8ca;"&gt;=Date(AddYears(Date(Date#('19'&amp;amp;Right(DateField,6),&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;'YYYYMMDD'),'DD/MM/YYYY')&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12.222222328186035px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #edf8ca;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,100*Left(DateField,1))&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;,'DD/MM/YYYY'&lt;/SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jan 2014 14:04:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-format-for-DB2-database/m-p/150928#M28863</guid>
      <dc:creator>priyav24</dc:creator>
      <dc:date>2014-01-30T14:04:40Z</dc:date>
    </item>
  </channel>
</rss>

