<?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 problem in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Date-problem/m-p/211699#M65905</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm loading data from a QVD. There is a date contained in my dataset; however, I can only reading it using the Date#() function. Attempts to load or subsequently convert the numeric date to a proper date 'M/D/YYYY' format do not work. I've tried everything I can think of:&lt;/P&gt;&lt;P&gt;Date#(myDate) - populates ok, but I really need to read using Date() so I can compare with other fields&lt;BR /&gt;Date(myDate) - doesn't work. No values populated&lt;BR /&gt;Date(Date#(myDate)) - doesn't work. No values populated&lt;BR /&gt;Date(Num(myDate)) - doesn't work. No values populated&lt;BR /&gt;Date(Date#(Num(myDate,'000000'),'YYMMDD')) - doesn't work. No values populated&lt;/P&gt;&lt;P&gt;I'm out of ideas. Can anyone help? I have no idea why I can't read in a simple date. Also, is there a way to look at the decimal value of what is actually stored in the column?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 Jan 2010 20:51:51 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-01-13T20:51:51Z</dc:date>
    <item>
      <title>Date problem</title>
      <link>https://community.qlik.com/t5/QlikView/Date-problem/m-p/211699#M65905</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm loading data from a QVD. There is a date contained in my dataset; however, I can only reading it using the Date#() function. Attempts to load or subsequently convert the numeric date to a proper date 'M/D/YYYY' format do not work. I've tried everything I can think of:&lt;/P&gt;&lt;P&gt;Date#(myDate) - populates ok, but I really need to read using Date() so I can compare with other fields&lt;BR /&gt;Date(myDate) - doesn't work. No values populated&lt;BR /&gt;Date(Date#(myDate)) - doesn't work. No values populated&lt;BR /&gt;Date(Num(myDate)) - doesn't work. No values populated&lt;BR /&gt;Date(Date#(Num(myDate,'000000'),'YYMMDD')) - doesn't work. No values populated&lt;/P&gt;&lt;P&gt;I'm out of ideas. Can anyone help? I have no idea why I can't read in a simple date. Also, is there a way to look at the decimal value of what is actually stored in the column?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jan 2010 20:51:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-problem/m-p/211699#M65905</guid>
      <dc:creator />
      <dc:date>2010-01-13T20:51:51Z</dc:date>
    </item>
    <item>
      <title>Date problem</title>
      <link>https://community.qlik.com/t5/QlikView/Date-problem/m-p/211700#M65906</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In a sense, here's all you need to know:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;date#(date,format) - reads in a non-QlikView date in the specified format, making it a QlikView date&lt;BR /&gt;date(date,format) - reformats the display of a QlikView date to the specified format&lt;/P&gt;&lt;P&gt;So if the date in your QVD is already a QlikView date:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;date(myDate,'M/D/YYYY')&lt;/P&gt;&lt;P&gt;If the date in your QVD is NOT already a QlikView date:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;date(date#(myDate,'your INPUT date format'),'your DESIRED date format')&lt;/P&gt;&lt;P&gt;Now, you've said that the date format you want is 'M/D/YYYY', so:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;date(date#(myDate,'your INPUT date format'),'M/D/YYYY')&lt;/P&gt;&lt;P&gt;But since I don't know the format of the date on your QVD, I can't finish the expression for you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jan 2010 21:06:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-problem/m-p/211700#M65906</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-01-13T21:06:36Z</dc:date>
    </item>
    <item>
      <title>Date problem</title>
      <link>https://community.qlik.com/t5/QlikView/Date-problem/m-p/211701#M65907</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks John!&lt;/P&gt;&lt;P&gt;I'm not sure how it is stored. I assume it is stored as 'M/D/YYYY' format since the following function works:&lt;/P&gt;&lt;P&gt;Date#(myDate, 'M/D/YYYY') as tmpDate&lt;/P&gt;&lt;P&gt;However, this doesn't work:&lt;/P&gt;&lt;P&gt;date(date#(myDate,'M/D/YYYY'),'M/D/YYYY') as tmpDate.&lt;/P&gt;&lt;P&gt;Besides, the system default date format is 'M/D/YYYY', so I shouldn't even need a format qualifier...right?&lt;/P&gt;&lt;P&gt;Is there any way to verify how it is being stored? Or, is there something else I can do?&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jan 2010 22:22:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-problem/m-p/211701#M65907</guid>
      <dc:creator />
      <dc:date>2010-01-13T22:22:47Z</dc:date>
    </item>
    <item>
      <title>Date problem</title>
      <link>https://community.qlik.com/t5/QlikView/Date-problem/m-p/211702#M65908</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I believe the problem may reside in the original load of the data from Excel. I have a table with 2 years worth of weekly data. I'm doing a CrossTable load to read in the dates.&lt;/P&gt;&lt;P&gt;myDataFile:&lt;BR /&gt;CrossTable(myDate, myData)&lt;BR /&gt;LOAD * FROM&lt;BR /&gt;[myFile.xlsx]&lt;BR /&gt;(ooxml, embedded labels, table is [myWorksheet 2008-2009])&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;This doesn't work: CrossTable(Date(myDate), myData). Not sure if there is a way to force a crosstable load of dates into any certain format???&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jan 2010 22:34:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-problem/m-p/211702#M65908</guid>
      <dc:creator />
      <dc:date>2010-01-13T22:34:09Z</dc:date>
    </item>
    <item>
      <title>Date problem</title>
      <link>https://community.qlik.com/t5/QlikView/Date-problem/m-p/211703#M65909</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK, so I gather that you're storing myDataFile to a QVD? So this crosstable load of an Excel file is where myDate is coming from?&lt;/P&gt;&lt;P&gt;Are the source fields formatted as dates in Excel, or are they numbers, or text, or something else?&lt;/P&gt;&lt;P&gt;If they're Excel dates, it appears that QlikView and Excel conveniently use the same internal format for dates, which is to say the number of days since midnight, December 30, 1899. So essentially, by loading in an Excel date, you should be loading in a QlikView date. You might want to tell QlikView that it's a date when you're building the QVD, but it's probably not critical, so I'd think your crosstable load would be fine as is.&lt;/P&gt;&lt;P&gt;Given all that, the expression date(myDate) when loading FROM the QVD should be all you need. However, you say that it doesn't work, that no values are populated. That makes me think that myDate is NOT actually a date, but rather a text field or something. So I guess that's the first thing I'd check. What is the format of the date fields in the Excel file?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jan 2010 23:02:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-problem/m-p/211703#M65909</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-01-13T23:02:33Z</dc:date>
    </item>
    <item>
      <title>Date problem</title>
      <link>https://community.qlik.com/t5/QlikView/Date-problem/m-p/211704#M65910</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are correct. I perform a crosstable load of the excel file, do some transformations &amp;amp; store as a QVD. I've validated the dates in question are actually stored as dates in Excel. I even re-created the worksheets using copy/paste values &amp;amp; manually formatting as Excel Dates.I've also tried saving the Excel file in 2003 (XLS) format to no avail.&lt;/P&gt;&lt;P&gt;For some reason, once the crosstable load is performed, I can only read this date using a Date#() function. Nothing else works. And, once it's stored as a Date#, I cannot use Date(), Month(), Year()...Nothing works. I'm wondering if crosstable is doing something weird to the date?&lt;/P&gt;&lt;P&gt;Can you think of a workaround to this? Perhaps I can create another lookup table in Excel that extracts Year, Month &amp;amp; Day into separate fields &amp;amp; then use MakeDate to get it working. It's not pretty, but it "may" work &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jan 2010 23:41:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-problem/m-p/211704#M65910</guid>
      <dc:creator />
      <dc:date>2010-01-13T23:41:15Z</dc:date>
    </item>
    <item>
      <title>Date problem</title>
      <link>https://community.qlik.com/t5/QlikView/Date-problem/m-p/211705#M65911</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That sounds pretty strange, then. I'm going to try to set up an example of this in my machine and see if I can get the same problem to appear. I could easily be forgetting something obvious that will jump out when I try to do it myself.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jan 2010 23:53:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-problem/m-p/211705#M65911</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-01-13T23:53:55Z</dc:date>
    </item>
    <item>
      <title>Date problem</title>
      <link>https://community.qlik.com/t5/QlikView/Date-problem/m-p/211706#M65912</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So far so good. It looks like I'm duplicating your problem. When I read in myDate, it sure looks like a date. But it isn't a date. It's just a text string. So yeah, it looks like everything goes wrong in the crosstable load before you even write the QVD.&lt;/P&gt;&lt;P&gt;Hmmm, don't think we can do a preceeding load with a crosstable load, so you may need to do this to handle reformatting the field as a date:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;myDataFile&lt;STRONG&gt;Temp&lt;/STRONG&gt;:&lt;BR /&gt;CrossTable(myDate&lt;STRONG&gt;Temp&lt;/STRONG&gt;, myData)&lt;BR /&gt;LOAD * FROM&lt;BR /&gt;[myFile.xlsx]&lt;BR /&gt;(ooxml, embedded labels, table is [myWorksheet 2008-2009])&lt;BR /&gt;;&lt;BR /&gt;&lt;STRONG&gt;myDataFile:&lt;BR /&gt;NOCONCATENATE&lt;BR /&gt;LOAD *&lt;BR /&gt;,date#(myDateTemp,'M/D/YYYY') as myDate&lt;BR /&gt;RESIDENT myDataFileTemp&lt;BR /&gt;;&lt;BR /&gt;DROP TABLE myDataFileTemp;&lt;BR /&gt;DROP FIELD myDateTemp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;It seemed to work for me with my sample file. There might be a cleaner way, but I'm not thinking of it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jan 2010 00:17:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-problem/m-p/211706#M65912</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-01-14T00:17:04Z</dc:date>
    </item>
    <item>
      <title>Date problem</title>
      <link>https://community.qlik.com/t5/QlikView/Date-problem/m-p/211707#M65913</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a million John! I went down the MakeDate path &amp;amp; everything is working fine. I had previously tried something similar to your example, but when I stored the QVD, everything went awry again. The Date#() function worked beautifully and the results look fine, but I couldn't thereafter perform a Date() function on the new field's value.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jan 2010 00:55:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-problem/m-p/211707#M65913</guid>
      <dc:creator />
      <dc:date>2010-01-14T00:55:09Z</dc:date>
    </item>
    <item>
      <title>Date problem</title>
      <link>https://community.qlik.com/t5/QlikView/Date-problem/m-p/211708#M65914</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;And, here's an alternative solution. Not as elegant as John's, but it works too &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;myDateLookup:&lt;BR /&gt;LOAD&lt;BR /&gt; Date#(myDate) as myDate,&lt;BR /&gt; Num(myMonth, '#0') as myMonth,&lt;BR /&gt; Num(myDay, '#0') as myDay,&lt;BR /&gt; Num(myYear, '0000') as myYear&lt;BR /&gt;FROM&lt;BR /&gt;[myFile.xlsx]&lt;BR /&gt;(ooxml, embedded labels, table is myDateLookup);&lt;BR /&gt;&lt;BR /&gt;TmpData:&lt;BR /&gt;CrossTable(sDate, sQty)&lt;BR /&gt;LOAD * FROM&lt;BR /&gt;[myFile.xlsx]&lt;BR /&gt;(ooxml, embedded labels, table is [myData 2008-2009]);&lt;BR /&gt;&lt;BR /&gt;TmpData1:&lt;BR /&gt;LOAD&lt;BR /&gt; myKey,&lt;BR /&gt; Date#(sDate, 'M/D/YYYY') as myDate,&lt;BR /&gt; sQty as myQty&lt;BR /&gt;RESIDENT&lt;BR /&gt; TmpData;&lt;BR /&gt;&lt;BR /&gt;LEFT JOIN (TmpData1)&lt;BR /&gt;LOAD&lt;BR /&gt; myDate,&lt;BR /&gt; myMonth,&lt;BR /&gt; myDay,&lt;BR /&gt; myYear&lt;BR /&gt;RESIDENT&lt;BR /&gt; myDateLookup;&lt;BR /&gt;&lt;BR /&gt;myData:&lt;BR /&gt;LOAD&lt;BR /&gt; myKey,&lt;BR /&gt; Date(MakeDate(myYear, myMonth, myDay), 'M/D/YYYY') as myDate,&lt;BR /&gt; myQty&lt;BR /&gt;RESIDENT&lt;BR /&gt;&lt;BR /&gt; TmpData1&lt;BR /&gt;;&lt;BR /&gt;&lt;BR /&gt;drop table myDateLookup, TmpData1;&lt;BR /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jan 2010 01:11:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-problem/m-p/211708#M65914</guid>
      <dc:creator />
      <dc:date>2010-01-14T01:11:34Z</dc:date>
    </item>
    <item>
      <title>Date problem</title>
      <link>https://community.qlik.com/t5/QlikView/Date-problem/m-p/211709#M65915</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You must evaluate your date:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Map_Extradata:&lt;/P&gt;&lt;P&gt;Directory;&lt;/P&gt;&lt;P&gt;CrossTable(YourDate, Data,3)&lt;/P&gt;&lt;P&gt;LOAD * FROM&lt;/P&gt;&lt;P&gt;[\\telesto\Base para QV\Balance &amp;amp; Cta. Resultados\Datos adicionales resultados.xlsx]&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is Plano);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;Fila,&lt;/P&gt;&lt;P&gt;Concepto,&lt;/P&gt;&lt;P&gt;Empresa,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Date(Num(Evaluate(YourDate) )) as "Posting Date",&lt;/P&gt;&lt;P&gt;Datos as Amount&lt;/P&gt;&lt;P&gt;Resident Map_Extrasata;&lt;/P&gt;&lt;P&gt;Drop Table Map_Extradata;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Feb 2011 09:25:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-problem/m-p/211709#M65915</guid>
      <dc:creator />
      <dc:date>2011-02-08T09:25:41Z</dc:date>
    </item>
    <item>
      <title>Re:Date problem</title>
      <link>https://community.qlik.com/t5/QlikView/Date-problem/m-p/211710#M65916</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I had the same problem and Pacos answer has fixed it nicely. thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Mar 2011 08:59:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-problem/m-p/211710#M65916</guid>
      <dc:creator>charlotte_qvw</dc:creator>
      <dc:date>2011-03-24T08:59:16Z</dc:date>
    </item>
    <item>
      <title>Date problem</title>
      <link>https://community.qlik.com/t5/QlikView/Date-problem/m-p/211711#M65917</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;John, You're my Hero &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/love.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Sep 2011 14:07:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-problem/m-p/211711#M65917</guid>
      <dc:creator>thierrytt1102</dc:creator>
      <dc:date>2011-09-28T14:07:12Z</dc:date>
    </item>
  </channel>
</rss>

